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

Jira automation - Sorting issue by customfield into email and minifie info

Alexandre ANTOINE December 1, 2021

Hello

With Jira automation, I send an automatic release email when sprint are closed. And it's work. But I want to improve it

On this email, I want 2 things :

- have the list of all epic link (text custom field) in the sprint, but only minifie. For example, if I have 3 issues with epic link "test" and 4 with epic link "test2", I only want writing 1time "test" and 1time "test 2"

- can I sort the issue otherwise than by issue ID ?

I'm currently on server, but will migrate on cloud in 2 month (so a solution working for the 2, or, at least, for cloud version will be wonderfull

Best regards

1 answer

1 accepted

0 votes
Answer accepted
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.
December 1, 2021

Hi @Alexandre ANTOINE 

I am using Jira Cloud, not Server/Data Center, so it would help me to see an image of your complete rule to offer suggestions.  Would you please post that?  Thanks!

Until then, I suspect you are using something like this as your rule:

  • trigger: sprint completed
  • branch: issues in the sprint (or with JQL) using the bulk-handling option
    • send your email

To do what you ask you would need two branches, one within another, and that is not possible with automation rules, or created variables, which are not in Server/Data Center version of automation.  Once you switch to Cloud this will be easy to do with lookup issues and created variables.

Until you switch, one complicated work-around for Server/Data Center version would be to gather those epics using JQL (which will minimize the result to one entry per epic), and store the list in an entity property for the project.  Then reference the entity property in the email.

Regarding your question about sorting by other than issue key, if your branch is based upon JQL you could pick your on ORDER BY clause.

Kind regards,
Bill

Alexandre ANTOINE December 2, 2021

Hello Bill

 

Please find below my automation configuration. Email correctly sending since the beginin.

2021-12-02_11h14_33.png

I try to use a #issue.customField_16304 to get the list of Epic (custom field 16304 give me the name of epic). But it's not working

I will try on my cloud test instance to create variable with lookupissue, maybe will I need some help

For the sort issue, how can I select the sprint I've closed with JQL ? (if I do "sprint in opensprint()", I get a blank email)

Thank a lot

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.
December 2, 2021

Thanks for that information.  To respond to your specific notes:

I try to use a #issue.customField_16304 to get the list of Epic (custom field 16304 give me the name of epic). But it's not working

For the branch you are using the bulk-handling feature in order to send one email and to get the smart value {{issues}} to work.  (Note that one is plural.)  You cannot reference {{issue}} in such a branch as singular.

If all of your issues have that custom field, you could reference the first one instead with:

{{issues.first.customField_16304}}

For the sort issue, how can I select the sprint I've closed with JQL ? (if I do "sprint in opensprint()", I get a blank email)

From that trigger, the smart value is {{sprint}} and so your JQL to try would be:

project = myProjectName AND sprint IN ( {{sprint}} )
Like David Mezera likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events