Is there a smart value to inherit parent name?

Dmitry Alabyan August 1, 2022

Hello Community!
I am trying to elaborate on the automation where the subtasks of the story are created with specified fields in them.
one of the subtasks is DEV, other is DESIGN.
What interests me - is there a smart value, that, when added to the summary field I specify for the subtasks, will allow them to inherit the Summary of the Story AND. either DEV or DESIGN along with it?

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2022

Hi Dmitry,

Yes, you should be able to do that with Automation for Jira. Do you have a rule created yet? 

Bill Sheboy
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.
August 1, 2022

Hi @Dmitry Alabyan 

Yes, and to John's answer:  we will need to see your current rule, and perhaps the audit log details, to help know possible suggestions.

Until that is posted...You cannot "inherit" the value from the parent, but you can copy it to add to the subtasks.  You would need additional rules if you want to keep them in synch, such as when the parent story changes.

Kind regards,
Bill

Dave Armstrong January 10, 2023

It looks like Dmitry isn't responded but I am looking for an answer to his question. I created an Automation, here is how I set it up:

  1. When: Issue created
  2. For Current issue
  3. If: Issue matches JQL
  4. Then: Create a new Sub-task
    1. Project: Same project
    2. Issue type: Sub-task
    3. Parent issue: Current issue
    4. Summary

That 4th sub-bullet, where I am setting the "Summary", is where I would like to use a Jira smart value for using the parent story name. I looked at the Atlassian Support page and it lists the following smart values:

  • {{issue.parent.key}}
  • {{issue.parent.priority.name}}
  • {{issue.parent.Epic Link}}
  • {{issue.parent.epic.summary}}

I attempt to set {{issue.parent.epic.summary}} - Development Phase as my Summary, but that didn't work. I assumed it wouldn't because I don't have the parent Story in an Epic. I then tried {{issue.parent.summary}} - Development Phase to see if that might work, but no dice. 

Reading @Bill Sheboy response, it sounds like I might need to add something to my automation to get the parent issue summary and copy it, but I can't quite understand how I might do that. 

Bill Sheboy
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 10, 2023

Hi @Dave Armstrong 

If you remove your branch to Current Issue, you may then reference the trigger issue's summary when the subtask is created with either of these:

{{issue.summary}}

{{triggerIssue.summary}}

Also of note: the Issue Created trigger and fire faster than the data is available to a rule, leading to problems.  The work-around for that is to add a Re-fetch Issue action immediately after the trigger; this will slow down the rule and reload the data before proceeding.

If that does not help, please post images of your complete rule and the audit log details for context.

Kind regards,
Bill

Dave Armstrong January 13, 2023

Thanks @Bill Sheboy that got it working. I assume only the original poster can "accept" an answer, but I truly appreciate your help.

I already had a branch under the "When: Issue created", so I just had to add the "Re-fetch issue date" action and then I updated my "Create a new Sub-task" to include {{issue.summary}} in the Summary, worked like a charm. 

My rule now looks like this:

  • When: Issue created
  • (Branch rule) For Current issue
    • (New Condition) If: Issue matches JQL
    • (Action) Then: Re-fetch issue data
    • (Action) And: Create a new
      • Project = Same project
      • Issue type = Sub-task
      • Parent issue = Current issue
      • Summary = {{issue.summary}} - Development Phase

 

CleanShot 2023-01-13 at 10.33.38.png

Like Bill Sheboy likes this
Bill Sheboy
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 13, 2023

Hi!  I recommend moving the Re-fetch up to immediately after the trigger.  Otherwise there is a chance that JQL condition could fail to match when the data is not ready yet.

Suggest an answer

Log in or Sign up to answer