setCommentVisibility doesn't work as expected in an unordered comment list case
Bug #2034027 reported by
Ines Almeida
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Medium
|
Unassigned |
Bug Description
In the specific case where bug IDs don't match the order that they were added (see https:/
In the example bug above, if we run `setCommentVisi
To post a comment you must log in.
Verified in staging that indeed when calling `setCommentVisi bility( 1)` (both via API and using the UI) in the example bug above, comment #3 is the one being updated.
I drafted a quick test to verify that the issue happens when the date when the comments were created don't match their index order. When we fetch the comment to set its visibility, we get the list of comments ordered by date, and then simply get the n-th comment.
This bug should only happen in very rare cases.