I am trying to create a conditional update of the parent of a sub-tasks to move to “Working” when the sub-tasks moves to “Working”.
The conditional statement would be to not transition the Parent if the Parent is in Testing, Ready to Accept, Accepted, or Done.
Can someone help with the syntax for the Conditional execution in JMWE. Thank you
Hi,
you didn't specify whether you're on Jira Server or Jira Cloud.
Also, why do you need a condition on the parent issue's status? Is the Start Working (or whatever the transition you're triggering on the parent) a global transition? Why not make it a regular transition if it should only apply to a single source status?
Anyway, on Jira Server, using JMWE for Jira Server, the condition would be:
! ["Testing", "Ready to Accept", "Accepted", "Done"].contains(parentIssue.getAsString("status"))
@David Fischer Hi David. Thank you for the reply !
And yes, its JIRA Server.
The above is a requirement that has been requested from out users (post approval from scrum masters). So, trying to get this done using JMWE add-on, as it seems simple.
Also, where would you advise I place this post function (which transition ?), if I want to automatically move the parent to "working" when one of the sub-task is moved to "working".
Also, thank you so much for the syntax. Will try using it and see if I m able to get it to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to add the post-function on the “to working” transition (you didn’t specify its name in your question) of the subtasks’ workflow. The post-function will need to be configured with the name or ID of the transition to trigger on the parent issue (e.g. “to working”) - not the _status_.
First make it work without the condition, then add the condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Fischer Our workflow follows the below statuses David,
To Do - Ready to work - Working - Testing - Ready to Accept - Accepted (Only Product owners can make this transition) - Done
The above is an example of how a typical workflow is for my project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
These are statuses, not transitions. You need to use transition names or IDs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Fischer Well, the transitions we have are,
Create
Ready to accept
Accepted
Done
So, where do you think I need to place the JMWE condition. I placed the condition you had mentioned at the Create transition and it doesn't work (When the sub-task moves to 'working', it does not change the story to 'working'. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I mentioned earlier, you should first try without the conditions, to make sure the post-function is configured correctly. Did you?
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.
Hi @Aisha M
try
def statusList = Arrays.asList("Testing", "Ready to Accept", "Accepted", "Done")
statusList.contains(parentissue.get("status"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Thank you for the comment !
So, I tried adding a post function at the "working" transition of the workflow to change the status of the parent to working when the sub-task is moved to working, along with the above statement you had provided.
Still does not work. Any thoughts on this ? Thank you
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.