Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Get Reference to the to be created issue

Edited

I am using Jira automation to stub out "standard" Epics when a new Initiative is created. This is my first of two questions:

  1. Epics show all child tickets. I find it useful to include a link to open items; e.g., JQL 
    "Parent Link"=[insert issue key] AND statusCategory != Done ORDER BY Sprint, Rank
    Is there some way to get the key of the to be created issue?
    I've tried:
    1. {{createdIssue.key}}
    2. {{createdissues.get(0).key}}
      but am not getting anything returned, presumably, because the issue hasn't been created yet

Thanks in advance!

1 answer

0 votes
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.
Oct 26, 2023

Hi @Steve Tedeschi 

Without seeing your automation rule, I suspect you are correct and trying to reference the smart value {{createdIssue}} before any issues have been created. 

The smart value to use depends upon your rule structure, and if you have only created one issue thus far in the rule, the value would be {{createdIssue.key}} 

Where are you trying to trying to create / use that JQL statement?

If you show your complete rule and audit log details showing the rule execution, that will provide context for the community to offer suggestions.

Kind regards,
Bill

@Bill Sheboy - Thanks for the prompt reply! I've added screenshot below. I'm building a simple table. The first row is a link to the parent ticket (initiative). The second is to see a ranked list of tickets within the epic (once I figure this out, I will add a row for open tickets).

The audit log shows that the ticket was successfully created. It does not show any errors.

Jira Automation - Epic Creation.jpg

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.
Oct 27, 2023

Regarding the audit log showing no errors: in many cases when a smart value expression evaluates to null, there is no error.

I am guessing in that Issue Create action, you are trying to add a link to the same issue which is being created.  If so, that is not possible because it has not yet been created and so the {{createdIssue}} smart value is null.

A work-around for that would be to add the value after the create:

  • Create the issue, with some token in place for the key.  For example, MYKEYTOKEN.
  • sAnd then immediately afterward
    • Branch to the most recently created issue
    • Edit the issue description, setting the value to
      • {{issue.description.replace("MYKEYTOKEN", issue.key)}}

@Bill Sheboy ,

Thanks again for the feedback. Unfortunately, still struggling to work this out.

I updated the initial description and added a branch to try and update without any luck. I tried to also create a subtask of the newly created task and that didn't work either.

Jira Automation - Epic Creation Updated Workflow.jpg

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.
Oct 30, 2023

Would you please post an image showing the audit log details (under "Show more") for the rule execution?  That may help to explain what you are seeing.

 

Is the newly created epic in the same Jira project as the one that triggered the rule, or a different project?

If so, is your rule a project-scope or global / multiple project-scope rule?

Rules at a project-scope can create (or clone) issues in any project, but to access an issue (like with the branch), the rule must be global or multiple project-scope.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events