Unable to Extract `fromString` and `toString` from Changelog for "Fix Versions"

jprieto March 11, 2025

I'm facing an issue with JIRA Automation where I cannot extract the `fromString` and `toString` values from the changelog for the "Fix Versions" field, even though the raw changelog data shows the changes are present. I've tried several troubleshooting steps, but I'm still getting empty output when iterating over the changelog. I would appreciate any insights or suggestions to resolve this issue.

 

Problem

I'm trying to build an automation rule that logs or processes changes to the "Fix Versions" field (e.g., adding or removing versions). Specifically, I want to access the `fromString` and `toString` values to determine what versions were added or removed. However, when I try to iterate over the changelog using smart values, I get empty output, even though the raw changelog data is populated.

 

Automation Rule Configuration

Trigger

  • Trigger: "Field Value Changed"
  • Field to Monitor: "Fix Versions" (selected from the dropdown)

Actions

  • Log Action 1: Log the raw changelog data
    • Raw changelog: {{changeLog}}
  • Log Action 2: Log "Fix Versions" changes
    • Fix Version changeLog: {{#changeLog.fixVersions}} From: {{fromString}}, To: {{toString}} {{/changeLog.FixVersions}}
  • Log Action 3: Log all changeLog fields (debugging)
    • All changeLog fields: {{#changeLog}} Field: {{field}}, From: {{fromString}}, To: {{toString}} {{/changeLog}}

 

Observed Behavior

When I edit an issue and add or remove a "Fix Version" (e.g., add `v1` or remove `v2`), the audit log shows the following:

  • Log Action 1 Output:
    • Raw changelog: {Fix Version=[ChangeItemBean{fieldId='fixVersions', field='Fix Version', fieldType='null', from='null', fromString='null', to='00001', toString='v1'}, ChangeItemBean{fieldId='fixVersions', field='Fix Version', fieldType='null', from='00002', fromString='v2', to='null', toString='null'}]}
    • This confirms that the changelog is populated and contains the expected data for "Fix Versions" changes.
  • Log Action 2 Output:
    • Fix Versions changeLog:  This is empty, even though the raw changelog shows changes for `fixVersions`.
  • Log Action 3 Output:  
    •  All changelog fields: Field: , From: , To:  
    • This is also empty, suggesting that the `{{#changelog}}` loop is not working as expected.

 

Expected Behavior

Based on the raw changelog data, I expect the following output for Log Action 2:

  • Fix Versions changelog: From: null, To: v1 From: v2, To: null

And for Log Action 3:

  • All changelog fields: Field: Fix Version, From: null, To: v1 Field: Fix Version, From: v2, To: null

 

Troubleshooting

I’ve tried the following to diagnose and fix the issue:

1. Verified Trigger:
  - Confirmed that the trigger is "Field Value Changed" with "Fix Versions" selected.
  - Tested by manually editing an issue to add/remove "Fix Versions" and confirmed the rule is triggered (visible in the audit log).

2. Logged Raw Changelog:
  - Confirmed that the `{{changelog}}` smart value shows the expected data, as shown in the log output above.

3. Checked Smart Value Syntax:
  - Used `{{#changelog.fixVersions}}` to access "Fix Versions" changes, which should match the internal field ID `fixVersions` in the changelog.
  - Tried alternative syntax, such as `{{#changelog.Fix Version}}`, but it also produced empty output.

4. Logged Full Issue Data:
  - Added a log action to output `Full issue data: {{issue}}`, which shows the issue details but doesn’t help with changelog access.

Questions

1. Why is the `{{#changelog.fixVersions}}` smart value producing empty output, even though the raw changelog shows the data is present?
2. Is there a bug or limitation in my version of JIRA that affects changelog processing in automation rules?
3. Are there alternative ways to access the `fromString` and `toString` values from the changelog?
4. Could this be related to permissions, field configuration, or customizations in my JIRA instance?

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2025

Hello @jprieto 

I'm not able to take time to address everything in your post but I can address this one part.

  • Log Action 3: Log all changeLog fields (debugging)
    • All changeLog fields: {{#changeLog}} Field: {{field}}, From: {{fromString}}, To: {{toString}} {{/changeLog}}
  • Log Action 3 Output:  
    •  All changelog fields: Field: , From: , To:  
    • This is also empty, suggesting that the `{{#changelog}}` loop is not working as expected.

The changeLog smart value doesn't support iterating of the fields list. You have to explicitly reference each field by name or ID; i.e. {{changeLog.fixversions}}

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2025

I did some experimentation and found syntax that works. I think the problem is you ended the iteration command with {{/changelog}} when you should use just {{/}}. The following works.

Screenshot 2025-03-11 at 10.39.48 PM.png

Like jprieto likes this
jprieto March 11, 2025

Hi @Trudy Claspillhank youI did not think to try "Fix Version", I've been relying on "fixVersion". I really appreciate your help.

Suggest an answer

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

Atlassian Community Events