Moving a bug into another product lists inactive components, milestones and versions

RESOLVED FIXED in Bugzilla 4.2

Status

()

Bugzilla
Creating/Changing Bugs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rrosario, Assigned: dkl)

Tracking

Bugzilla 4.2
Bug Flags:
approval +
approval4.4 +
blocking4.4 +
approval4.2 +
blocking4.2.5 +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

5 years ago
This component isn't used anymore and causes confusion. We end up getting lots of bugs filed under this component that should all be handled directly in SUMO since it is a wiki and has it's own forum for article editors and localizers.

If possible, please remove it.
(Assignee)

Comment 1

5 years ago
Sorry, there are 514 bugs outstanding for this component. We must reassign those bugs to another component before we can delete this one. Is there another component we can move them to or should we create a "graveyard" product for support.mozilla.org and move them there?

https://bugzilla.mozilla.org/buglist.cgi?component=Knowledge%20Base%20Articles&product=support.mozilla.org

dkl

Comment 2

5 years ago
Removing is not very useful as it destroys "historical information". Closing the component for new bug entries (should be possible in the latest version IIRC) and moving to graveyard sounds more useful, but this requires a plan for what to do with open tickets.
(Assignee)

Comment 3

5 years ago
(In reply to Andre Klapper from comment #2)
> Removing is not very useful as it destroys "historical information". Closing
> the component for new bug entries (should be possible in the latest version
> IIRC) and moving to graveyard sounds more useful, but this requires a plan
> for what to do with open tickets.

I can certainly disable the component for future use and leave the current bugs as-is for now. Does this sound sufficient?

dkl
(Reporter)

Comment 4

5 years ago
(In reply to David Lawrence [:dkl] from comment #3)
> 
> I can certainly disable the component for future use and leave the current
> bugs as-is for now. Does this sound sufficient?

If that prevents new bugs being filed in that component, then yes that is exactly what we want :-)
(Assignee)

Comment 5

5 years ago
It has been done.
Assignee: nobody → dkl
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 6

5 years ago
People are somehow still able to file bugs with the Knowledge Base Articles component - https://bugzilla.mozilla.org/show_bug.cgi?id=822002
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 7

5 years ago
(In reply to Verdi [:verdi] from comment #6)
> People are somehow still able to file bugs with the Knowledge Base Articles
> component - https://bugzilla.mozilla.org/show_bug.cgi?id=822002

Hmm. Seems to be a bug in the way that Bugzilla filters the inactive components/versions/milestones when moving a bug from one product to another. inactive values are omitted from enter_bug.cgi and show_bug.cgi for the same product, but are not omitted when moving from one to another. This is how bug 822002 was able to be moved into the inactive component.

Moving to upstream and will come up with a patch.

dkl
Status: REOPENED → ASSIGNED
Component: Administration → Creating/Changing Bugs
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Version: Production → 4.5

Updated

5 years ago
Summary: Remove "Knowledge Base Articles" component from support.mozilla.org product → Moving a bug into another product lists inactive components, milestones and versions

Comment 8

5 years ago
The validators should also reject the new component/milestone/version if they are disabled. Simply hiding values from the UI is not enough. It's very easy to bypass it by hacking the URL directly.
Flags: blocking4.4+
Flags: blocking4.2.5+
Target Milestone: --- → Bugzilla 4.2
(Assignee)

Comment 9

5 years ago
Created attachment 693948 [details] [diff] [review]
Patch to disallow setting of inactive values when changing product (v1)
Attachment #693948 - Flags: review?(LpSolit)
(Assignee)

Comment 10

5 years ago
Comment on attachment 693948 [details] [diff] [review]
Patch to disallow setting of inactive values when changing product (v1)

Need to revise patch as this will not work when the bug is currently set to a component that was active originally but is now set to inactive and any other change is made.

dkl
Attachment #693948 - Flags: review?(LpSolit)
(Assignee)

Comment 11

5 years ago
Created attachment 699477 [details] [diff] [review]
Patch to disallow setting of inactive values when changing product (v2)
Attachment #693948 - Attachment is obsolete: true
Attachment #699477 - Flags: review?(LpSolit)

Comment 12

5 years ago
Comment on attachment 699477 [details] [diff] [review]
Patch to disallow setting of inactive values when changing product (v2)

>+    my $old_comp = blessed($invocant) ? $invocant->component_obj
>+                                      : $params->{component};

If we create a new bug, $params->{component} contains the name of the component and $old_comp->name will crash because it's not an object. You should do what you did for versions and milestones, i.e. get the component name using $invocant->component.


>+    if ($object->name ne $old_comp->name && !$object->is_active) {

With the change above, ->name must go away as it's a string, not an object.



>=== modified file 'template/en/default/global/user-error.html.tmpl'

>+    The [% type FILTER html %] value '[% value FILTER html %]' is not active.

The problem here is that type is not localizable. You should call [% object_name %] as done in object_does_not_exist.



Otherwise looks good.
Attachment #699477 - Flags: review?(LpSolit) → review-
(Assignee)

Comment 13

5 years ago
Created attachment 703010 [details] [diff] [review]
Patch to disallow setting of inactive values when changing product (v3)

Thanks. New patch for review.
Attachment #699477 - Attachment is obsolete: true
Attachment #703010 - Flags: review?(LpSolit)

Comment 14

5 years ago
Comment on attachment 703010 [details] [diff] [review]
Patch to disallow setting of inactive values when changing product (v3)

r=LpSolit
Attachment #703010 - Flags: review?(LpSolit) → review+

Comment 15

5 years ago
I also tested it with 4.2.4 and it works fine.
Flags: approval4.4+
Flags: approval4.2+
Flags: approval+
(Assignee)

Comment 16

5 years ago
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk    
modified Bugzilla/Bug.pm
modified template/en/default/global/user-error.html.tmpl
Committed revision 8560.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/4.4             
modified Bugzilla/Bug.pm
modified template/en/default/global/user-error.html.tmpl
Committed revision 8508.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/4.2             
modified Bugzilla/Bug.pm
modified template/en/default/global/user-error.html.tmpl
Committed revision 8185.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED

Comment 17

5 years ago
w00t! Thanks

Updated

5 years ago
See Also: → bug 752946

Updated

5 years ago
See Also: bug 752946

Updated

5 years ago
See Also: → bug 840824

Updated

5 years ago
Blocks: 840824

Updated

5 years ago
See Also: bug 840824

Comment 18

5 years ago
Added to relnotes for 4.4rc2 and 4.2.5.
You need to log in before you can comment on or make changes to this bug.