Dear Community members,
I have the following problem to solve and I don't know quite how to do that:
I have a select box with the 4 values A / B / C / D, a transition T1 between the statuses S1 and S2 .
Depending on the value in my select box (A,B,C or D), when T1 is transitioned, it can be approved / assigned to 4 different roles and the users that are being notified differ as well. There should be only one transitioin action available on the screen.
Any ideas how that can be done?
Thank you and best regards
Alain
PS: I do have the JMWE add-on at my disposal
You won't be able to implement this with out-of-the-box Jira. You'll need a third-party app such as JMWE (our app), JSU, ScriptRunner, etc.
With JMWE, you'll be able to implement this with very limited coding (a couple of lines of code inside point-and-click workflow extensions).
Dear David,
Thank you for your reply.
As mentioned in my post I do have JMWE, but I haven’t figured out how to implement it. Do you have any suggestion ?
Thanks a lot for your support
Alain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alain,
I'm trying to understand your exact requirements. What do you mean by "it can be approved / assigned to 4 different roles"? Can you elaborate? Are you trying to assign the issue to one member of a role, the role being dependent on the value of the select field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
That's it. If the select field is A, then members of role 1 will be notified and only members of role 1 can transition , if the select field B members of role 2 will be notified and only members of role 2 can transition etc.
Each role will have a default assignee
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can make four different transitions from S1 to S2, but than I would have 4 transition buttons on the screen. That's what I want to avoid. I want only one button, let's say 'Approve', that will than automatically transition based on the value of the select field.
Maybe some hidden transitions not visible to the user but will be triggered based on the select field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alain,
I'm a little confused now. Let me try to rephrase the way I understand it now:
However, I didn't get the "notification" part. Which notification? And when / by what is it sent?
If the notification is sent during the T1 transition, and just needs to go to a different set of people based on the select field, then here's how to achieve both goals:
def role
switch (issue.get("select field")) {
case "A":
role = "Role 1"; break;
case "B":
role = "Role 2"; break;
//etc
}
return !role || currentUser.isInProjectRole(role, issue.get("project"))
def role
switch (issue.get("select field")) {
case "A":
role = "Role 1"; break;
case "B":
role = "Role 2"; break;
//etc
}
return role ? issue.get("project").getRoleMembers(role) : []
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you read my previous post?
As for your schema, the problem is that there is no notion of "role assignee" in Jira. You can only assign an issue to a single user. So I'm still confused with Wyatt you're trying to achieve.
Maybe you can just comment on my previous summary of my understanding?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
Maybe initially I was not very clear in my writing. Let me rephrase. The process I need to implement is an approval process which needs to be approved by different people depending on the value of the select box. So I imagine this requires 4 different transitions, here in the middle of the diagram, that after 'approval' go to the bottom status.
Without the select box , In JIRA core, users would have to choose one out of 4 transitions to trigger the correct approval process. I'd like to avoid having the user to choose which transition to trigger from the 4 but rather have that dealt with transparently.
Your suggestion with the scripted groovy Condition could be a way to go.
You said here is no notion of "role assignee" in Jira.
Right, but in JMWE you this
Property key: defaultAssignee
Property value: contains a comma-separated list of entries in the form ProjectKey -> *RoleName
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you mentioned about JMWE is just a way to select one user when JMWE's "Assign to Role Member" post-function finds multiple users in the same project role. But generally you should not be using a project role that contains multiple members, as it makes it harder to understand what the post-function does. What the post-function does is assign the issue to a single user, since the Assignee field in Jira is a single-value field.
As for your approval needs, see my previous replies - you don't need to create multiple transitions, the same one will work and only be available to the appropriate users based on the value of your select field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alain Reding I see that you are running on Server so you do not have the Cloud Automation at your fingertips. I looked further into this in the light of David's answer and I forgot that you can run a script with JMWE, that you already have.
HTH,
KGM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.