Forums

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

Cannot access certain fields using SMART Values

Michael Shaffer Sr March 11, 2024

I am trying get the max duedate from the stories in the Epic so I can set the Epic duedate to the max. I have an automated rule that get the stories int the Epic but I cannot get the value of Due Date in the Stories. Also, I cannot get the labels. Below I am writing the date in the automation rule to set this info in the Epic Description field. The bolded lines do print the correct values from the stories. Is there a configuration setting that needs to be set to get the data?

 

start

{{#lookupIssues.labels}}{{.}}, {{/}}

{{#lookupIssues.summary}}{{.}}, {{/}}

{{#lookupIssues.duedate}}{{.}}, {{/}}

end

{{lookupIssues.dueDate.max}}

{{lookupIssues."Due Date".max}}

{{lookupIssues.duedate.max}}

Story point = {{lookupIssues.Story Points.sum}}

lookupIssues.size:{{lookupIssues.size}}

lookupIssues.subtasks.duedate: {{lookupIssues.subtasks.duedate}}

lookupIssues.duedate.value: {{lookupIssues.duedate.value}}

lookupIssues.Due Date.first: {{lookupIssues.Due Date.first}}

lookupIssues.duedate.first: {{lookupIssues.duedate.first}}

lookupIssues.duedate.name: {{lookupIssues.duedate.name}}

lookupIssues.duedate.value: {{lookupIssues.duedate.value}}

lookupIssues.Due Date: {{lookupIssues.Due Date}}

lookupIssues.key:{{lookupIssues.key}}

triggerissue.duedate: {{triggerissue.duedate}}

{{#lookupIssues.key}}First:{{duedate|Hello world}} Second:{{created|Hello world}}{{/}}

{{#lookupIssues}}

* DUE DATE:{{DUEDATE}}

* DUE DATE2:{{dueDate}}

* UPDATED: {{updated}}

{{/}}

{{#lookupIssues}}

* {{key}}:{{key.dueDate.jqlDateTime}}

* {{key}}:{{this.duedate.jqlDateTime}}

{{/}}

{{#lookupIssues}}

* {{key}}:{{key.dueDate.value|Hello world}}

* {{key}}:{{duedate.value|Hello world}}

{{/}}

key={{lookupIssues.get(0).key}}

duedate={{lookupIssues.get(0).duedate|NULL}}

summary={{lookupIssues.get(0).summary|NULL}}

key={{lookupIssues.get(1).key}}

duedate={{lookupIssues.get(1).duedate|NULL}}

summary={{lookupIssues.get(1).summary|NULL}}

3 answers

0 votes
vincenzo.spatafora
Contributor
April 26, 2024

Dear Bill,

may I ask please when the {{lookupIssues.duedate}} smart variable will be available also for Jira Server / Data Center?

Thanks in advance,

Vincenzo.

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.
April 26, 2024

Hi @vincenzo.spatafora -- Welcome to the Atlassian Community!

I do not have that information, as I am just another user with no knowledge of Atlassian planning.

I recommend watching this suggestion to see progress, or working with your Jira site admin to contact the Atlassian support team to ask for their forecast: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877

In the interim, you may use the workarounds I noted in this same thread to access the other issue fields.

Kind regards,
Bill

Like vincenzo.spatafora likes this
vincenzo.spatafora
Contributor
April 29, 2024

Thank You very much Bill, very appreciated your answer.

I will check that, thanks.

Have a nice start into the week,

Kind Regards, Vincenzo.

Like Bill Sheboy likes this
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.
March 11, 2024

Hi @Michael Shaffer Sr 

You appear to be using Jira Data Center version.  Is that correct?

If so, the lookup issue action does not yet support all fields in the issue.  Here is the suggestion to add those: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877

When the lookup issues action was first added for Jira Cloud, it also only supported about a dozen fields.  About a year later, all the rest of them were added...so perhaps that will eventually happen for Server / Data Center versions also.

Now for some work-arounds...

If you are only reading the values to use in a message / email, you may be able to use the bulk-handling option with a scheduled trigger or branch: https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html  This will then provided the {{issues}} smart value; note this one is plural.

That approach is not always possible, due to rule structure, or the need to use the issue values in an edit action.  In that case, instead try calling the REST API function for an issue search, using the same JQL your lookup would have used, and call that function with the Send Web Request action.  Here is a how-to if you want to try that approach: https://community.atlassian.com/t5/Jira-Software-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

Kind regards,
Bill

0 votes
Guido Scollo March 11, 2024

Hi Michael,

checking the documentation https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/  it should be

{{issue.duedate}}

 Is the "Due Date" field visible in issues of type Story?

Michael Shaffer Sr March 11, 2024

Yes. The field is visible. I have a query populating the lookupIssues object. I can get the issue keys and summary but not the labels or duedate field data. I can get other dates like created and updated. I think the syntax you listed is for the current issue.

vincenzo.spatafora
Contributor
April 29, 2024

Hi Guido,

how have you managed to use the lookupIssues feature for the due date field?

I understand that is NOT available yet for Jira Server / Data Center ?

I really need that and I would like to know as how you did.

Thanks in advance,

Vincenzo.

Guido Scollo April 30, 2024

Hi Vincenzo, I am sorry, I have not managed it. You can open a support request to Atlassian and ask them if there is a workaround.

vincenzo.spatafora
Contributor
April 30, 2024

Thanks Guido for letting me know,

Ciao, Vincenzo.

vincenzo.spatafora
Contributor
May 3, 2024

Ciao @Guido Scollo,

in case you still need it, find in here as how to look for the sub-tasks due dates, to take the max and apply it to the parent due date:

How to implement the lookupIssues function for the... (atlassian.com)

Cheers, Vincenzo. 

Like Guido Scollo likes this
Guido Scollo May 3, 2024

Hi Vincenzo,

thank you. I have just read the thread.

Suggest an answer

Log in or Sign up to answer