-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fields in testplans/forms.py are not used #677
Comments
same goes for EditPlanForm.author |
After investigating this here is what I found:
Moreover, when looking further into the classes that inheret these two I found out more things we can improve:
class XMLRPCNewPlanForm(EditPlanForm):
text = forms.CharField()
class XMLRPCEditPlanForm(NewPlanForm):
name = forms.CharField(
label="Plan name", required=False
)
type = forms.ModelChoiceField(
label="Type",
queryset=PlanType.objects.all(),
required=False
)
product = forms.ModelChoiceField(
label="Product",
queryset=Product.objects.all(),
required=False,
)
product_version = forms.ModelChoiceField(
label="Product Version",
queryset=Version.objects.none(),
required=False
) These two form - Also this raises the questions - Why do we have forms that deal with XMLRPC in Moreover, we support both XML-RPC and JSON-RPC and AFAIK they both use the same code base, just the parser is different. So the JSON-RPC API uses a lot of classes that are prefixed with Here is what needs to be done IMO:
@atodorov what do you think about this plan? please give your opinion and I can start working on this immediately |
+1, you can go ahead and delete the entire
Be careful here!!! These are not "not used". They are used as a base for other classes, which are then used when handling RPC requests, so they are very much in use. The correct form of action here is to:
this is part of the change above (separate commits for everything) and you should be careful for:
Not now, open a separate issue for this. This is a rather big change which needs to be planned and accounted for. I would rather spend the time to refactor these as described above instead of just moving the around.
This is renaming only and making sure everything matches. We can rename the module itself easily but I prefer to update the classes and functions one-by-one to avoid massive changes. However the naming is only due to historical reasons and you are welcome to implement a pylint checker that will warn us about bogus names (and also drive the rename/refactor effort). Again new issue so we can plan this.
To answer this - legacy! |
It is merged with NewPlanForm
It is merged with NewPlanForm
It is merged with NewPlanForm
It is merged with NewPlanForm
#655 removes labels from form fields since we prefer having the text in the HTML templates. However In NewPlanForm there is the tag field which doesn't seem like it is in use.
Definitely not in use when creating a new TP or editting existing TP. However there are inherited form which may be using this field.
The text was updated successfully, but these errors were encountered: