Skip to content
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

Use dropdown field instead of text field for distro addition when project is added #777

Closed
Zlopez opened this issue Apr 30, 2019 · 1 comment · Fixed by #870
Closed

Use dropdown field instead of text field for distro addition when project is added #777

Zlopez opened this issue Apr 30, 2019 · 1 comment · Fixed by #870
Labels
Medium Priority This ticket has a medium priority type.feature New feature

Comments

@Zlopez
Copy link
Contributor

Zlopez commented Apr 30, 2019

The distro field should allow selection from already known distribution. The same behavior we have when adding new distribution mapping.

This will prevent creation of distributions with typos.

@Zlopez Zlopez added type.feature New feature Medium Priority This ticket has a medium priority labels Apr 30, 2019
@Zlopez
Copy link
Contributor Author

Zlopez commented Apr 30, 2019

Implementations details

This is just re-usage of already implemented code:

  1. Use code from forms.MappingForm in forms.ProjectForm (https://github.com/release-monitoring/anitya/blob/master/anitya/forms.py). Add a empty value to select field, because this should be optional.
  2. Use code from ui.edit_project_mapping in ui.new_project (https://github.com/release-monitoring/anitya/blob/master/anitya/ui.py)

Zlopez added a commit to Zlopez/anitya that referenced this issue Dec 19, 2019
Instead of text field, that could be filled by anything, user will now
choose their distribution from dropdown field. This will lower the
amount of distributions with typos.

Closes fedora-infra#777

Signed-off-by: Michal Konečný <[email protected]>
Zlopez added a commit that referenced this issue Jan 8, 2020
Instead of text field, that could be filled by anything, user will now
choose their distribution from dropdown field. This will lower the
amount of distributions with typos.

Closes #777

Signed-off-by: Michal Konečný <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Priority This ticket has a medium priority type.feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant