|Reported by:||rmunn@…||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
I'm writing a simple contact-tracking application in Django. I have Person, Address, and Newsletter models. Newsletter is a many-to-many relation to Person, so that I can ask "Who got the June 2005 newsletter?" and "How many newsletters has John Smith missed?". I used the filter_interface option to tie Newsletter to Person in the admin interface. I then set up some test data to play around with the filter_interface, including three Persons: John Smith, Linda Jones, and Sophie Sophist (who lives at 123 Philosopher Lane, naturally).
Selecting individual people and clicking the left and right arrows moved names around just fine. No problems there. And single-clicking on the "Clear all" and "Choose all" worked as expected. Double-clicking on either "Clear all" or "Choose all", though, produced some weird results: all the names would move across, but then when moved back, a single name would get left behind. E.g.:
- "Available persons" contains all three names.
- Click on "Choose all". All three names move to "Chosen persons".
- Click on "Choose all" a second time. No visible result.
- Click on "Clear all". All three names move to "Available persons", but a second copy of Linda Jones is left behind.
- Click on "Choose all". All three names from "Available persons" move over to "Chosen persons", and there are now four names (including two Linda Jones entries) in "Chosen persons".
Repeating such a procedure ends up yielding five names, then six, then seven, out of the original three. All of them act like real entries: I can select them one at a time and move them left or right, and they don't disappear.
Furthermore, if I click three or four or five times on "Choose all" before clicking on "Clear all", then two or three or four names get left behind when I finally do click "Clear all".
This also works in reverse, e.g. if I click "Clear all" multiple times and then click "Choose all", it will also leave some names behind.
If I leave one side or the other ("Chosen persons" or "Available persons") empty, the correct values seem to go into the database: it only creates one row in the multiple-join table even though there are ten copies of Linda Jones present in "Chosen persons", for example. But if a name is present in both "Chosen persons" and "Available persons", "Chosen" wins. A single copy of John Smith in "Chosen persons" trumps a dozen John Smiths in "Available persons".
I can reproduce this bug consistently using Firefox 1.0.6 on Ubuntu Breezy, and Firefox 1.0.6 on Mac OS X 10.3.9.
Change History (6)
Changed 9 years ago by Gary Wilson <gary.wilson@…>
comment:1 Changed 9 years ago by Gary Wilson <gary.wilson@…>
comment:4 in reply to: ↑ 3 Changed 9 years ago by Gary Wilson <gary.wilson@…>
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Accepted