{{#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
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):
Kind regards,
Bill
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}}
{{/}}
{{/}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.