Forums

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

How can I find out the previous parent ticket for a task that was a sub-task for jira automation?

Oksana Baier January 16, 2023

Hello,

I try to make estimation rule for corner cases - I wrote about it in previous post here: https://community.atlassian.com/t5/Jira-Software-questions/Need-help-in-automation-for-jira-with-summ-of-original-estimate/qaq-p/2239061 

 

And I made the rule with all cases, except one:

 

Sub-task move to task - we need recount estimation in previous story, which was a paren of our sub-task

 

I try to find parent id in change log of our task by:

{{#changelog.parent}}{{fromString}}{{/}}

But it is not working

How I can know parent link in this case? Who can help me? :)

1 answer

0 votes
Gideon Nolte _Eficode_
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.
January 16, 2023

Hi @Oksana Baier ,

this is a tricky one. I would suggest solving this by setting the current parent key as an issue property named "oldParentKey" (or something like that) via a scheduled trigger with a jql of "parent is not empty" + set entity property for issue to {{issue.parent}}. Then have a rule which does so for every new issue with a parent or every time a parent is added to an issue.

This way, you can access the old parent key via {{issue.properties.oldParentKey}} when the issue type changes. Check for the presence of that property first and then do whatever you have to do with the key.

Hope this helps / is clear. If you have any questions or would like a more detailed explanation, just say so.

Greetings
Gideon

Oksana Baier January 16, 2023

Can we not find this value in change log of the task?

Gideon Nolte _Eficode_
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.
January 16, 2023

From what I tried, we cannot.

Suggest an answer

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

Atlassian Community Events