"change several bugs" deletion of depends-on/blocks does not translate bug alias




7 years ago
5 years ago


(Reporter: djm, Unassigned)





7 years ago
When changing multiple bugs at once, the "Depends On" and "Blocks" fields accept bug aliases for addition ("Add these IDs") but not deletion ("Delete these IDs"). 

How to reproduce:

1. Create a few bugs
2. Give one bug an alias, say "XXX"
3. Mark all the other bugs as blocking XXX
4. View the blockers of XXX in "change several" (e.g. via XXX -> show dependency tree -> change several)
5. In the "Blocks" field, enter XXX and select the "Delete these IDs" option
6. Click commit

expected result: bug XXX ends up with an empty blockers list
actual result: bug XXX doesn't

Comment 1

7 years ago
Hum, indeed. And this is still a problem in 4.1.3.
OS: OpenBSD → All
Hardware: x86_64 → All

Comment 2

7 years ago
The reason is that Bugzilla::Bug->set_all has:

            foreach my $remove (@{ $params->{$name}->{remove} || [] }) {
                @dep_ids = grep($_ != $remove, @dep_ids);

But when you pass an alias, it will never match any element from @dep_ids and so will never be removed.

This works when adding an alias because it will never match any element from @dep_ids either, for the same reason, and so will always be added. _check_dependencies() will then convert aliases into bug IDs.
You need to log in before you can comment on or make changes to this bug.