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

Duplicate Candidate Builds and Related Bugs #897

Closed
tkdchen opened this issue Sep 1, 2016 · 8 comments · Fixed by #935

Comments

@tkdchen
Copy link
Contributor

commented Sep 1, 2016

While creating a new update, I enter fedpkg in Packages, then Bodhi find out candidate builds and related bugs and put them into respective list. Next, I don't leave the page, and change the package name but still the same name fedpkg, Bodhi tries to find out builds and bugs again, and fill them in the list again, as shown below.

screenshot from 2016-09-01 15-29-13

Expected result is to prevent from filling in duplicate candidate builds and related bugs.

@bowlofeggs

This comment has been minimized.

Copy link
Member

commented Sep 1, 2016

Thanks for the report and helpful screenshot @tkdchen, I agree that these duplicates shouldn't appear. Probably something needs to clear out the results before showing more.

I'm guessing this is a JS issue, but I could be wrong.

@bowlofeggs bowlofeggs added the JS label Sep 1, 2016

@tkdchen

This comment has been minimized.

Copy link
Contributor Author

commented Sep 2, 2016

@bowlofeggs I think you are right. In bodhi/static/js/update_form.js, event handler of typeahead:selected just adds builds and bugs without removing existing ones.

@k3rn3l3rr0r

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2016

I think we can simply replace the content of the boxes with the spinners when the typeahead:selected event is triggered, instead of prepending them to the content. This will ensure that the boxes are cleaned up and only the items found for the newly selected package will be shown... Shall I create a PR from this 5f3ba13?

@bowlofeggs

This comment has been minimized.

Copy link
Member

commented Sep 6, 2016

@k3rn3l3rr0r Will this still work if the user wants to select multiple packages for the update? For example, if I want to make an update on ejabberd and erlang-p1_pam (one of its dependencies) and I type "ejabberd" and select it, when I start typing erlang-p1_pam will it clear my ejabberd selection?

@k3rn3l3rr0r

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2016

@bowlofeggs This would clear the selection everytime you start typing a new package name into the packages input field. Not the right way to go, as I see now. So, the only way to achieve the desired behaviour would possibly be, to compare if the newly retrieved build ID's and bug ID's aren't already listed while adding them into the respective lists. Shall I give this approach a try? I'm not a packager myself, so I'm just slowly figuring out how exactly is this tool used. But I would like to help...

@bowlofeggs

This comment has been minimized.

Copy link
Member

commented Sep 6, 2016

@k3rn3l3rr0r Another approach that could work is simply to clear any items that haven't been checked by the user. That might be simpler, actually, and would probably be more expected behaviour. I think I lean towards this option. What do you think @tkdchen?

I am impressed that you are contributing to Bodhi without necessarily being a user of it. We really appreciate your help. @k3rn3l3rr0r++

@k3rn3l3rr0r

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2016

@bowlofeggs So, another proposal in c6a9abf, but if we don't do it the hard way - comparing the ID's - we can still end up with duplicates in the lists. If you check some of the checkboxes and after that selects the same package in the typeahead field, there will show up the already selected options (but unchecked) in the list too...

@bowlofeggs

This comment has been minimized.

Copy link
Member

commented Sep 15, 2016

@k3rn3l3rr0r yeah I think you are correct. How about we both compare IDs and drop unchecked boxes. Does that sound good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.