Hi all
I want to make a condition that certain transition will be executable only if one of the parent custom fields will match certain value.
For example - i have subtask which i want to move from : "in progress" to "done".
I want that this transition will be visible only where the field org.group value which, belong to this subtask parent, will be : SAP"
Best Regards
Hi Dan, assuming that you have separate workflow for sub-tasks, it should be similar to:
issue.parent.customfield_xxxxx == "SAP"
It depends what kind of field is your org.group field. If it is a Select, then it would be like:
issue.parent.customfield_xxxxx?.value == "SAP"
It's up to you to find out the id and type of your custom field. If you have an app with autocomplete feature like Workflow Building Blocks for Jira, in Jira expression field, after issue.parent. start typing the name of your field, you will get suggestions, which you can click and id of the field will be entered for you. You will also get syntax errors in case the type of the field is incorrect, which will help you make it right.
Finally, if you don't have a separate workflow, then you can make the condition to be checked only for subtasks, i.e. if parent != null. e.g.:
issue.parent != null ? issue.parent.customfield_xxxxx?.value == "SAP" : true
Hope it will help.
Cheers
Hi
First thank you for your response.
Yes, i m talking about different WF.
eventually i implemented as you wrote and added a small change.
It goes as follows :
!! issue.parent.customfield_XXXXX && issue.parent.customfield_XXXXX.value == " SAP"
and it worked!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad, I could help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.