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}}

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.
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.

Suggest an answer

Log in or Sign up to answer