In our system we have multiple different user types: Some can add bugs, some can set them as fixed, some can set them as closed, etc.

The problem is that if a user with restricted statuses adds a follow up, their array of status options only includes options they are allowed to set it to, not the currently selected option. This means that if a bug is say 'fixed' and the original poster comes back to it to add a follow up they will not have 'fixed' as an option and the bug will get set back to 'active'. Even if a user is not granted the ability to change to that state, they should at least be able to leave the state as is.

The attached patch modifies the project_issue_state function to add a fourth parameter: $current_sid, which is the current sid of the issue. The current sid always shows up as an option on the user's select list.

CommentFileSizeAuthor
issue.inc_.patch1.54 KBaugustd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Version: 4.7.x-1.2 » 4.7.x-2.x-dev

yup, i'm all for this kind of thing. it's closely related to (but not quite duplicate with) http://drupal.org/node/97145. i just got back from a long vacation, and have a mountain of emails and issues to catch up with, so i have no time to review/test/commit this now, but just wanted to mention i'm all in favor in principle.

that said, i won't add new features to the 4.7.x-1.* series, only DRUPAL-4-7--2 (4.7.x-2.*) or HEAD (which is now 5.x-0.*, and will hopefully soon become the 5.x-1.* stable series).

thanks,
-derek

dww’s picture

Assigned: Unassigned » dww
Status: Needs review » Fixed

Cleaned up the comments and formatting of your patch, reviewed, tested, committed to DRUPAL-4-7--2, forward ported to 5.x-*, tested, and committed to HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)