Here is the requirement:
1. Assign dynamic sign-off approvers based on issue component
This is being achieved by the following:
all_users = "";
if(helper.contains(issue.getComponentObjects(),"MC")){
mc = << See bullet #2 >>
if(all_users == ""){
all_users = mc;
} else{
all_users = all_users + "," + mc;
}
}
//Repeat for each component...
users = all_users
rule = all_users
2. The approver list needs to be maintainable by non-admin users
Since we use ldap groups in our JIRA install, end users have the ability to own their ldap groups and maintain the members. So I would like to dynamically pull in user for the sign-off from the JIRA groups, such that the script line from #1 about would be something like:
mc = ""+helper.getUsersByGroup(groups, "jira_mc_approval_group", ",");
I don't believe there is a helper method for this, but can I do this using any of the JIRA group APIs? If not, do you have any other ideas for meeting this requirement?
I realize one option would be to create roles for each component approval and allow the members to be retrieved from there using the getUsersByProjectRole helper method, but since the roles are globally defined and this is only for one specific project I am reluctant to go that route and expose several roles that don't make sense to other projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.