Hi Community,
I'm working on a more advanced Jira Automation rule and have hit a roadblock that I eventually solved. I'm sharing the journey here to help others.
My Goal:
I want to create a single rule that, when manually triggered, performs a bulk operation:
Finds a set of issues using a specific JQL query.
For each issue found, it searches the history to find the first time a custom group picker field (e.g., "Escalation Group") was set to a specific group (e.g., "Support Coordinators").
If a match is found for an issue, it logs the date of that change.
4. If no match is found for an issue, it should do nothing and silently move to the next one.
I already tried to make a couple of tries, but I can't manage to make the branch detect the changelogs. At least when I try to make a branch using {{issue.changelog}} it goes in without problems, but after that, i can't recover any loggable data.
I hope I made myself clear.
Thank you in advance for your help! :)
Hi @ccabrera , I don't believe you can leverage changelog with a manual trigger. AFAIK, changelog only works when triggering on field change. I will be interested in others input here.
Hi @Jack Brickey
Thank you very much for your response, I didn't know that and it's some interesting info!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you go to support.atlassian.com and search the docs AI presents the following...
How to Use Changelog in Automation to Detect When a Value Changed
You can leverage Jira Automation's smart values to access changelog data and identify when a field value has changed. Here’s how you can do it:
{{changelog}}
Smart ValueThe {{changelog}}
smart value is available in automation rules triggered by issue edits.
It provides a list of changes for each field. For example, to get the new value of the Summary field after a change:
{{#changelog.summary}} {{toString}} {{/}}
To get the previous value of a field (e.g., Status):
{{#changelog.status}}{{fromString}}{{/}}
To get the new value:
{{#changelog.status}}{{toString}}{{/}}
You can use these in actions like logging, commenting, or sending notifications 1.
{{fieldChange}}
Smart ValueWhen using the "Field value changed" trigger, the {{fieldChange}}
smart value gives you:
{{fieldChange.field}}
: Name of the changed field
{{fieldChange.fromString}}
: Previous value
{{fieldChange.toString}}
: New value
Example log message:
Field {{fieldChange.field}} changed from {{fieldChange.fromString}} to {{fieldChange.toString}}
This is especially useful for sending notifications or reverting changes 2 3 4.
Use the CHANGED
operator in JQL to find issues where a field value was changed:
status CHANGED AFTER "2024/01/01"
assignee CHANGED BY "username"
You can specify date ranges, users, or specific value transitions 5 6 7.
The {{changelog}}
and {{fieldChange}}
smart values are only available for certain triggers and field types.
For object attribute changes (Assets/Insight), you need to use a web request to the object history API, as changelog smart values are not available for these triggers 8.
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.