Forums

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

How to get property from parent level when checking condition in child level?

Gokaraju gopi
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 Champions.
December 29, 2025

{{#webResponse.body.values}}{{#items}}{#if(equals(fromString, "In Progress"))}}{{/}}{{/}}{{/}}

How to get created property from values when fromString property is matched inside items?

 

Use example response from /rest/api/3/issue/{issueKey}/changelog api

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 Champions.
December 29, 2025

Hi @Gokaraju gopi 

The suggestion you got from the other tool is not correct; there is a limitation for the long-format of smart values iterators: once inside the iterator, only data from that scope and lower is visible.

For your scenario, the created attribute cannot be "seen" once inside the {{#items}} ... {{/}} iterator as it filters to that scope.

 

One workaround is using the inline iterator and the match() function rather than a nested, long-format iterator.  For example:

{{#webResponse.body.values}}
{{#if(items.toString.match("^(In Progress)").size.gt(0))}}
{{created}}
{{/}}
{{/}}

Please note this could return multiple created values for the changelog entries, so decide how you want to handle that...such as adding delimiters and parsing the results.

 

Also, it appears you are doing this for the Status field entries in the changelog, so perhaps instead use the Bulk Fetch Changelogs endpoint as that allows filtering by the field(s):

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-changelog-bulkfetch-post

 

Kind regards,
Bill

0 votes
Gokaraju gopi
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 Champions.
December 29, 2025

Got following suggestion from Handlerbars but it was not working in jira smart values in automations

 

{{#webResponse.body.values}}
  {{#items}}
    {{#if(equals(toString, "In Progress"))}}
      {{../created}}
    {{/}}
  {{/}}
{{/}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events