Bob Swift Create on Transition - Linking to a newly created issue

kaanozdemir May 7, 2018

I am creating multiple sub-tasks in different post functions of the same transition and trying to link these sub-tasks to each other in order they were created. Here is an example of the create post function that i tried. (i only wrote what i thought was relevant as it is quite a big post function)

Post function of sub-task2 create:

JQL query: parent = %original_key% order by key asc

Link: %jql_result_1%, Link type: Blocks, Link direction: From issue key to new issue

Even though this function is placed after the first sub-task creation, I am guessing that JQL query cant see the newly created sub-task so it cant link to them as they are being created. Is there any way around this?

@Bob Swift OSS (Bob Swift Atlassian Apps)

1 answer

0 votes
Deleted user May 9, 2018

Hi @kaanozdemir,

Create on transition has two properties available for use in such type of cases.Let us assume you have 3 subtasks that are getting created on a transition.

%property_org.swift.jira.cot.last_created_key% : This will link the newly created subtask #2 with the previously/last created subtask # 1. For example, if you use this in #3 subtask then it will be linked to previously created subtask (#2). This completely depends on the order of the post functions. Here is the sample example on how you can use it

Link: %property_org.swift.jira.cot.last_created_key%, Link type: Relates, Link direction: From new issue to issue key

%property_org.swift.jira.cot.created_key_list% :

Irrespective of the order, if you want to link all the 3 subtasks (each subtask linking to other two subtasks), then you can use this in all the 3 post functions so all are linked together. Here is the sample example on how you can use it.

Link: %property_org.swift.jira.cot.created_key_list%, Link type: Relates, Link direction: From new issue to issue key

Thanks,

Swathi

Aparna bharati Sahoo November 15, 2018

Hi Swathi,

 

The answer really helped me. But i have one more doubt.

 

Screnario - I created 3 stories under a epic. i want to link both 2nd & 3rd created stories to the 1st one.

By using "%property_org.swift.jira.cot.last_created_key%" i linked 2nd & 1st story. But didn't find any solution to link 3rd & 1st story. Any solution for this?

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events