Hi Guys,
Need your help in automation.
I want to capture old value of Fix version in another field.
Rule is running for edit issue trigger >> When new value added/remove from Fix version field, older value will update in Single line text field. I am using below smart value but it's not updating the field.Kindly suggest :-
{{issue.changelog.fixVersions.toString}}
Note :- Using Automation for JIRA DC
Hello @Vikrant Yadav
I was looking at the documentation for Smart Values and specifically for {{changelog}} for DC here:
https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html
I think that your syntax is not correct. The examples in the document look like this:
{{#changelog.summary}}
{{toString}}
{{/}}
{{#changelog.issuetype}}
{{fromString}}
{{/}}
// Previous status name
{{#changelog.status}}{{fromString}}{{/}}
// Previous status id (for using in another Edit action
{{#changelog.status}}{{from}}{{/}}
Additionally the document says it is not available with all triggers, so there may not be changelog information when using the Field Value Changed trigger.
I did some experimenting in my Jira Cloud instance with Field Value Changed and Issue Updated triggers and the format shown above, and was not able to get any output from the changelog for the fixVersions field. For Jira Cloud the documentation also says that the fields available in the change log are limited. I don't know if that might be the case in Automation for Jira DC also.
Hi @Trudy Claspill ,
Thanks for your response!
I tested this as well :- {{#changelog.fixVersion}}{{toString}}{{/}} but it won't give any response and not update the field.
I tried this as well {{fieldChange.fromString}} , it works sometime and sometime it doesn't work. When i remove a single fix version sometime it works but when multiple fix version it breaks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trying to think of other options...
It is not pretty, but you could use two custom fields.
Each time Fix Version changes, write the contents of field #1 to field #2. Then write the contents of Fix Versions to Field #1. Field #2 would always have the value before the last change to the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill How do I copy the value? If I use post function or automation it copy the current value to Field 2. Can you please share the trigger and action which I need to setup for this? 🙏
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For my custom fields I created two Version multi-select fields.
The TRIGGER for the rule is Field Value Changed for the Fix Versions field.
After that I created two Condition: IF/Else blocks
If field1 is not empty
Then copy field1 to field2
Else
Set field2 to nothing
ACTION: Re-fetch data
If Fix Versions is not empty
Then copy Fix Versions to field1
Else
Set field1 to nothing
Here's an example of the first If/Else
This is Edit Issue Fields #1
And this is Edit Issue Fields #2
The second If/Else block would be similar but
- substitute Fix Versions for Current Fix Versions
- substitute Current Fix Versions for Previous Fix Versions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy ClaspillThanks for the solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, there is no workaround currently.
Here is a linked defect: https://jira.atlassian.com/browse/JSWCLOUD-22815
Best regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...
Here is the related defect for automation, which covers both Jira Cloud and Server/Data Center versions of the symptom: https://jira.atlassian.com/browse/JIRAAUTOSERVER-207
Please note, you may observe changelog intermittently working for fixVersion. I found through testing there are very specific paths by which it still works and it randomly fails for others. IMHO: this one is quite broken :^)
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Bill Sheboy and @Samuel Gatica _ServiceRocket_
yep, there is no workaround for this right now.
Any alternate solution, you would like to suggest. I have Scriptrunner and JMWE
What is the result of this value :- {{triggerissue.fixVersions.name}} ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.