Link issue when transitioning a sub-task to an own issue

Lars Böhnke July 2, 2021

Hey, I'd like to link issues in cases where a sub-task is transitioned to an own issue. For example, sub-task is transitioned to its own story. I now want the new issue being linked to the former parent.

This is what I tried but it fails. Any ideas?

Screenshot 2021-07-02 at 18.37.33.png

4 answers

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 4, 2021

Hi @Lars Böhnke

After trying many things since last night, I manage to do something, but not quite what you want to achieve. And I think that I have found out the reason why:

parent.png

The solution would be to track the changes for the Parent link. However the parent link is locked to the Premium Plan only.

I did manage to succeed on making a connection when a subtask was changing the parent, but NOT when a subtask was converted to an issue.

I honestly believe that with the standard plan this can't be done :(

Lars Böhnke July 7, 2021

What a pity. But thanks man for playing around with it! Appreciate it!

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2021

No problem. It's a pity that I wasn't able to help you

0 votes
Vitaliy Tarakanov February 3, 2023

Worked for me this way:

1. Using Jira Automation plugin (free version), add a new rule. You need to come up with some trigger (I selected simply Issue updated), add a condition (I selected only Sub-task issue type within my project) and the action "Edit issue fields".

In Linked issues, select your desirable link type. In the field Issue, it will give you only two options to choose from. But you can also free-type there. Copy-paste didn't work for me at first, only after typing some letters.

Put there this text: {{issue.parent.key}} and save your rule.

Screenshot 2023-02-03 at 19.29.13.png

2. Then, just trigger automation by updating or bulk-updating your Sub-tasks. For example, you can add a label to all of them. It will link your Sub-tasks to their parents. 

3. Then, bulk-move your Sub-tasks into your desired issue type such as Task or Story. Probably can be combined with #2, but need to play with it to make sure (the relevant trigger might be different).

0 votes
Daniel Ebers
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.
July 28, 2021

Hi @Lars Böhnke

... this is one I just did not want to give up. Meanwhile there is a rule that does what you suggested - it got quite complex, though.

It works using a team-managed project.

Mainly it is based on API call, this is needed as the requirement is complex and cannot be satisfied with stock rules, what turned out when you both tried.

The rule itself looks the following:

grafik.png

On trigger "Value changes for" "Issue Type" (for Edit issue) a web request to Jira own's API is sent to investigate the current's issue changelog.
The following Smart Value is put to a variable called "restcall":

{{#webhookResponse.body.changelog.histories.last}}{{#items}}{{fromString}}{{toString}}{{/}}{{/}}

The next following log to audit is not especially needed, it can be neglected.

Then using the variable "restcall" the API is queried once again to get the key (ABC-123) of the issue's ID.

A new variable "restcallissuekey" will be holding the value

{{webhookResponse.body.key}}

In the last step of the rule the issue is linked to the former parent issue - by using the key from the variable.

Please check if it works for you.

Cheers,
Daniel

Lars Böhnke August 3, 2021

Oha, will try! Thanks!

0 votes
Daniel Ebers
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.
July 9, 2021

Hi @Lars Böhnke + @Alex Koxaras _Relational_

could you please do me a favour and have a look into the following - in my instance (Free, not Premium) from the looks it worked - however there must be something in the wind, when you both said it is too hard it's unlikely this is what you are searching for.

Let's go.

grafik.png

What I understood and what works:
when a sub-task is existing under an issue and the sub-task will be converted to an issue using "Convert to issue" the user wants to have a link between the new (converted) issue and the former issue (the previous parent).

Please do a test and let me know what is missing.
Nothe the test was in a company-managed project. (Free plan).

Cheers,
Daniel

Lars Böhnke July 15, 2021

Didn't work for me :( I use 

Value change → for parent link → for create issue

then link issue → split from → {{issue.parent.key}}

Screenshot 2021-07-15 at 19.29.33.png

Daniel Ebers
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.
July 18, 2021

Two questions + one idea:
1.) the issue stays within the same project but gets assigned a different parent, correct?
You do not try to move it to another project if I understand it correctly, right?

2.) is this a company-managed project or a team-managed project?

3.) Could you please try to log the {{issue.parent.key}} using a log action, probably the step before actually linking?

Lars Böhnke July 23, 2021

1. yes

2. team-managed

3. Will try, thx

Daniel Ebers
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.
July 25, 2021

"Team-managed" will be at least the cause for the differences we are seeing in this automation. They work differently.
In case the feature would be of high importance you could consider creating a company-managed project. The automation rule works for that type of project.

To be honest, after some extensive tests this looks not like it would be a stable solution (neither of both project types). Also I am not sure if accessing the former parent after the conversion to an issue is possible in this way.
In Community there are reports that the basic idea should work using the "Value changes for" trigger (Issue Type) but this only works in my demo now when populating the field (creating a sub-task), not anymore when converting to an issue.

Overall, I believe that Alex is right when saying this does not work at the moment - team-managed projects could make it even harder to accomplish it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events