Hello,
I am trying to figure out how to conditionalize a workflow based on a subset of projects with a subset of custom field values.
For the sake of this example, there are 2 projects using the same workflow, custom field, and custom field values.
1. The projects are: A and B.
2. The workflow is: To Do > In Progress > Done
3. The custom field is: Demo
4. The custom field values are: Yes and No and EMPTY (default)
I would like to enable a condition whereby:
- user can move issue in project A from In Progress to Done regardless of the custom field value (i.e. can equal Yes or No or be EMPTY)
- user can move issue in project B from In Progress to Done only if the custom field value equals Yes or No (i.e. cannot be EMPTY)
Does anyone know of a way to implement such a condition?
I have the following apps to use: Scriptrunner, JMWE, JSU.
Hello @Gil Vinokoor
We have raised a request in our Beecom portal to provide quick support and to track the progress of the ticket. Please register in our portal and access the ticket using this link: https://beecom-products.atlassian.net/servicedesk/customer/portal/3/JSU-3179.
And to answer your question, yes you can achieve this requirement using JQL Condition(JSU). Edit the workflow and on your transition configure the conditions as below:
As per your example, we are considering the projects as A and B and assuming the custom field named Demo to be of type Radio Button
JQL for the first requirement:
project = "A" AND key = {issue.key} AND ("Demo" in (No, Yes) OR "Demo" is EMPTY )
JQL for the second requirement:
project = "B" AND key = {issue.key} AND ("Demo" is NOT EMPTY )
Please let us know if this helped you in achieving your requirement or not!
Regards
Kinnera
Hi @Kinnera,
Thank you for the detailed and helpful response.
This is exactly what I was looking for and did the trick, so thank you!
With that, if you know of/can think of a way to visually inform Project B users why the close/done transition is hidden, and what they need to do to have it appear, that would be helpful too.
Gil
P.s. Despite registering in the portal, when I clicked the link I got an error message, "No Access. You do not have permission to view this request."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Gil Vinokoor
We have marked you as a reporter for the ticket https://beecom-products.atlassian.net/servicedesk/customer/portal/3/JSU-3179 in our portal and now you'll be able to see the updates from the ticket.
In the future, if you have any issues please feel free to submit a new ticket. We are always happy to help you!
Best Regards
Kinnera Siriki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gil,
with JMWE for Jira Server/DC, you can add a Scripted (Groovy) Validator to the Done transition with the following script:
issue.get("project").key == "A" || issue.get("custom 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 Fischer ,
Thanks for replying with a suggested JWME script.
I'm less familiar with scripting and didn't fully understand how to implement my use case based on what you wrote.
Fortunately, another answer was provided that helped did the job.
Thanks again for trying to help.
I'm sure there will be more opportunities for that in the future. ;)
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.