Closed
Bug 595569
Opened 14 years ago
Closed 14 years ago
Deleting a product/component throws an error
Categories
(Bugzilla :: Administration, task)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: timello)
Details
(Keywords: regression)
Attachments
(1 file)
1.00 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
Try to delete a product from editproducts.cgi. In 4.1 only, you get the following error:
visibility_value_id is not a valid parameter for the Bugzilla::Field::match function.
Traceback:
at Bugzilla/Object.pm line 445
Bugzilla::Object::_check_field(...) called at Bugzilla/Object.pm line 228
Bugzilla::Object::match(...) called at Bugzilla/Field.pm line 256
Bugzilla::Field::match(...) called at Bugzilla/Field/ChoiceInterface.pm line 113
Bugzilla::Field::ChoiceInterface::controls_visibility_of_fields(...) called at Bugzilla/Field/ChoiceInterface.pm line 41
Bugzilla::Field::ChoiceInterface::_check_if_controller(...) called at Bugzilla/Product.pm line 272
Bugzilla::Product::remove_from_db(...) called at /var/www/html/bugzilla/editproducts.cgi line 235
Assignee | ||
Comment 2•14 years ago
|
||
Also, that happens when removing components.
Summary: Deleting a product throws an error → Deleting a product/component throws an error
Assignee | ||
Comment 3•14 years ago
|
||
Assignee: administration → timello
Attachment #474962 -
Flags: review?(mkanat)
Assignee | ||
Updated•14 years ago
|
Attachment #474962 -
Flags: review?(mkanat) → review?(LpSolit)
Assignee | ||
Updated•14 years ago
|
Attachment #474962 -
Flags: review?(LpSolit) → review?(mkanat)
![]() |
Reporter | |
Comment 4•14 years ago
|
||
This also prevents field values from being deleted, in editvalues.cgi.
Comment 5•14 years ago
|
||
Comment on attachment 474962 [details] [diff] [review]
v1
>=== modified file 'Bugzilla/Field/ChoiceInterface.pm'
>+ "SELECT id FROM fielddefs
>+ INNER JOIN field_visibility ON id = field_id
>+ WHERE value_id = ? AND visibility_field_id = ?", undef,
You don't need that INNER JOIN, you just need to select field_id from field_visibility, and make sure that you do SELECT DISTINCT.
Attachment #474962 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 6•14 years ago
|
||
(In reply to comment #5)
> Comment on attachment 474962 [details] [diff] [review]
> v1
>
> >=== modified file 'Bugzilla/Field/ChoiceInterface.pm'
> >+ "SELECT id FROM fielddefs
> >+ INNER JOIN field_visibility ON id = field_id
> >+ WHERE value_id = ? AND visibility_field_id = ?", undef,
>
> You don't need that INNER JOIN, you just need to select field_id from
> field_visibility, and make sure that you do SELECT DISTINCT.
Yes, we do need. value_id is not unique in field_visibility the primary key is both columns.
![]() |
Reporter | |
Comment 7•14 years ago
|
||
Increasing severity as it affects several parts of administration, see comments 2 and 4. This prevents me from doing some QA too.
Severity: normal → major
Comment 8•14 years ago
|
||
Comment on attachment 474962 [details] [diff] [review]
v1
>=== modified file 'Bugzilla/Field/ChoiceInterface.pm'
>+ INNER JOIN field_visibility ON id = field_id
id and field_id should have table names on them, to be clear.
Otherwise this looks fine. :-)
Attachment #474962 -
Flags: review- → review+
Updated•14 years ago
|
Flags: approval+
Assignee | ||
Comment 9•14 years ago
|
||
Committing to: bzr+ssh://timello%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Field/ChoiceInterface.pm
Committed revision 7548.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•