Open Bug 684769 Opened 13 years ago Updated 2 months ago

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

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

4.0.2
defect
Not set
minor

Tracking

()

People

(Reporter: djm, Unassigned)

Details

Attachments

(1 obsolete file)

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
Hum, indeed. And this is still a problem in 4.1.3.
OS: OpenBSD → All
Hardware: x86_64 → All
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.

This issue is still occuring.

Attachment #9384700 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: