Closed Bug 456642 Opened 16 years ago Closed 16 years ago

Mass bug edit form for buglist.cgi shows inactive bug statuses in drop down

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(1 file, 2 obsolete files)

When selecting "Change Several Bugs at Once" link from the bottom of a buglist.cgi query, the Status drop down select shows states that are marked inactive in the database. They should be omitted from the list.

Part of the cause for this is that editworkflow.cgi allows for creating workflows that include inactive bug states. So buglist.cgi loads the select with all possible bugs states that are allowed according to the current workflow configuration and does not filter inactive states.

Possible solutions:
1. Do not allow inactive states into the workflow. editworkflow.cgi should filter out inactive states when editing or creating. When a bug states is marked inactive though, you would need to re-edit the workflow and save again to remove the invalid transitions. Would need a way for this to happen automatically.

2. Simply add a NEXT statement in template/en/default/list/edit-multiple.html.tmpl. The NEXT would skip any bug states that are marked inactive.

Number 2 could work for the interim but I feel like this could happen again in other places if the states are loaded directly from status_workflow table without regard to the inactive value in bug_status table.

Dave
Attachment #340011 - Flags: review?(mkanat)
Comment on attachment 340011 [details] [diff] [review]
Patch to filter inactive bug states in edit-multiple.html.tmpl (v1)

Status::can_change_to() explicitly checks for isactive=1. But this code is not called from buglist.cgi. You have to fix the SQL query in buglist.cgi itself. Look for $bug_status_ids.
Attachment #340011 - Flags: review?(mkanat) → review-
OS: Linux → All
Hardware: PC → All
Version: unspecified → 3.2
Filter out non-active bug states in buglist.cgi SQL when using mass edit change form.

Please review
Dave
Assignee: query-and-buglist → dkl
Attachment #340011 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #340068 - Flags: review?(LpSolit)
Comment on attachment 340068 [details] [diff] [review]
Patch to filter inactive bug states in edit-multiple.html.tmpl (v2)

>+         INNER JOIN bug_status
>+                 ON id = new_status
>+              WHERE isactive = 1

Works fine. But for clarity (we use many tables here), I would like that you specify the name of the table, i.e. write bug_status.id = sw1.new_status WHERE bug_status.isactive = 1. r=LpSolit
Attachment #340068 - Flags: review?(LpSolit) → review+
This is a minor issue as you cannot mark bug statuses as inactive from the UI. We can still take it for 3.2rc2, as we exclude inactive bug statuses elsewhere anyway.
Severity: normal → minor
Flags: approval3.2+
Flags: approval+
Target Milestone: --- → Bugzilla 3.2
Change SQL to use full table.column naming format per LpSolit suggestion. Checking in this patch since it was previously approved.

Dave
Attachment #340068 - Attachment is obsolete: true
Attachment #340144 - Flags: review+
tip:
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.386; previous revision: 1.385
done

3.2:
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.374.2.5; previous revision: 1.374.2.4
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: