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

Lookup for Jira server

Shushan Kocharyan July 23, 2024

I have a jira server project. In our project we create subtasks for back-end, Front-end and QA under the parent issue(e.g. story). Now I want to have an automation that based on some trigger filters the tickets that have BE tag, sums original estimates of those and puts that on a specific field. I know that Jira cloud has Lookup option, which is unavailable for server. What options could I use? 

2 answers

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.
July 23, 2024

Hi @Shushan Kocharyan 

First, I recommend checking if the time tracking and tag fields are in the data loaded for the subtasks smart value.  You may do that by writing these to the audit log:

time: {{issue.subtasks.timetracking.originalEstimateSeconds}}
tags: {{issue.subtasks.tag}}

If the values are present, that will provide a comma-separated values list.

 

Assuming that works, when filtering on a list to perform math operations, I recommend adding a default value of 0 at the front, and adding the operator (e.g., +) before the values.  That will ensure the expression works for any null values. 

And, I do not believe the contains() function is supported for inline, operations.  Perhaps try using match() instead.

For example:

{{#=}}0{{#issue.subtasks}}{{#if(tag.match("(BE)").isNotEmpty())}}+{{timetracking.originalEstimateSeconds}}/3600{{/}}{{/}}{{/}}

 

However if those fields are not in the subtasks smart value, you will need to use the Send Web Request action to call the REST API issue search with JQL to access the information.  The response may then be used the same way as a Lookup Issues result.

 

Kind regards,
Bill

0 votes
Shushan Kocharyan July 23, 2024

Here is an automation that I'm currently looking into, but it doesn't work as well. It simply puts 0 instead of any sum calculation result 

 

image.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events