Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Transition parent issue from subtask using JMWE

Pangeel Shubha April 1, 2020

We have multiple sub-tasks for a parent issue.

In the DONE transition of sub-task we trigger a USER HIDDEN transition on PARENT issue and update a certain field in the PARENT Issue.

The condition to trigger the transition in the parent is that all the sub-tasks must be in DONE status.

The above has been working fine until now.

Now we have an additional requirement. When one of the critical fields in sub-task is SET, we need to update corresponding field in the parent issue. This should happen for the FIRST SUBTASK for which the field gets SET. The parent issue field is updated and also fires an event to send an email notification to certain users.

We tried adding another USER HIDDEN transition on PARENT issue for this in the same status.

This works fine, but the ABOVE older transition stopped working.

We noticed the statement "only the first applicable transition" is triggered on the parent issue.

But we want to trigger both thee transitions. Could you please suggest a workaround.

1 answer

1 vote
Radhika Vijji _Innovalog_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2020

Hi Shubha,

If you want two available transitions to be triggered then you need to add two post-functions each triggering one transition. That is because the Transition post-functions are designed to trigger only one transition at a time.

Regards,

Radhika

Pangeel Shubha April 1, 2020

@Radhika Vijji _Innovalog_ , thanks for the prompt response. The fact is I have added 2 transitions triggered by 2 post functions on the SAME STATUS of parent issue, but only one seems to be getting triggered. 

Radhika Vijji _Innovalog_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2020

Hi Shubha,

Could you please answer these questions?

  1. Is this on Server or on the Cloud?
  2. Are these hidden transitions Auto-transitions (status does not change)? If one of the post-functions that you configured to transition the parent issue and set a field value changes the status of the parent then the second post-function might not find the transition, since the status changed.
  3. Can you share a snapshot of the post-function configuration?
  4. Why don't you use a Copy field value to parent issue post-function to set the second field? Why do you need a transition that needs to be triggered on the parent?

Regards,

Radhika

Pangeel Shubha April 13, 2020

@Radhika Vijji _Innovalog_ thanks for your recommendation of using copy field value. That gave me the right idea to fix this issue. Now it seems to be working fine. 

Although, i have additional question. 

When i trigger a transition from SUBTASK (A)  on the PARENT (P), is there some way i can access the CALLING ISSUE's fields (A's fields) in the post function of the PARENT ? 

Similar to issue. issuetype() or originalissue.issuetype() something like sourceissue, callingissue or anything ?

Radhika Vijji _Innovalog_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 13, 2020

Hi Subha,

Do you mean using the "Transition parent/related issues" post-function? Yes, you can access the Subtasks' fields while triggering a transition on the parent issue. I suppose you are on Jira Server. Please confirm. And also please present me with the actual use case to help you better.

For example, when you are triggering a transition on the parent from the subtask using the "Transition parent issue" post-function and you want to set the Due date of the parent to that of the subtask during the transition, then in the post-function configuration under the "Set fields of issue" section. select the Due date field and then select "Copy field value from current issue" option. This will copy the Due date from the subtask in context to the parent.

Regards,

Radhika 

Like Pangeel Shubha likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events