Have an automation that is triggered when a value is changed (FixVersions) and have an email sent that includes the new changed value, want to also add the previous value ... here is what I go so far .. but doesn't work:
Changed to: {{triggerissue.fixVersions.name}} <-- this works
Changed from: {{changelog.fixVersions.fromString}} <-- this does not work
Have tried a few different combinations of .name.fromstring and others without success. Any help appreciated.
Hi Mathew,
This is what I use for a field change:
{{issue.key}}'s {{fieldChange.field}} field was updated from {{fieldChange.fromString}} to {{fieldChange.toString}} by {{initiator.displayName}}.
It fires when the field is updated so I assume it will work for fixVersions also.
Thanks! This worked (mostly.) Only limitation I found testing it was if I add more than one fixVersion then it returns empty, but in our situation it is generally 1:1 change and not multiple versions, so it should work most of the time.
Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] , I tried using your suggestion, for a rule triggered by change of Fix Version. It works well for everything, but {{fieldChange.fromString}}. It displays a blank for this. However, it works fine with {{fieldChange.toString}}
I tried the exact same solution where I have the trigger based on change if other fields like 'assignee'; where it works well for both fromString and toString. Any thoughts on why it does not work for FixVersion?
My trigger condition pasted below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raji,
Are you sure there was an existing value for the Fix Version for that issue before it was updated? The fromString would be blank if there was no value. In other words, you edited the field to add a new Version when there was no value already in the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
Yes, I had an existing value on the Fix Version/s
Here is my scenario and rule setup ; I had FixVersion as v1.1 on a JIRA Story PRO-100, and I edited the Fix Version/s to v1.2. The goal is to add a comment on the story when fix version changes. In my example, the rule got triggered and the output was as below
{{issue.key}}'s {{fieldChange.field}} field was updated from {{fieldChange.fromString}} to {{fieldChange.toString}} by {{initiator.displayName}}
resulted in adding below comment
PRO-100's Fix Version field was updated from to v1.2 by Raji Joseph
whereas, I was expecting it to be
PRO-100's Fix Version field was updated from v1.1 to v1.2 by Raji Joseph
as you see, the output of {{fieldChange.fromString}}, came out as blank
Snapshot of the complete rule pasted below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what I wrote for ours and it works and should get you some ideas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mathew, thanks for your response. I tried replicating the smart values examples that you shared above, and still getting a blank for the 'fromString'
Could you share your trigger condition pls
Also, in your use case, how are you editing the fixversion? Manually, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I manually change. Clicking in the Fix Version field and selected the new Fix Version.
Here is the trigger.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Mathew Sommers
Looks to be similar to the trigger condition I posted above. But, does not work for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Mathew Sommers. I don't know if you found a solution, but I have found one.
We can see the following example in the docs {{#changelog.fixVersion}}{{toString}},
Screenshot from docs
but it isn't correct, because in the changelog the fixVersion field is called 'Fix Version'
Screenshot from Jira Automation log:
So, if you want to get all fixVersion changes from #changelog please use
{{#changelog.Fix Version}}{{toString}} instead of {{#changelog.fixVersion}}{{toString}}
Result of execution:
In your case it should be {{changelog.Fix Version.fromString}} instead of {{changelog.fixVersions.fromString}}
I hope you'll find it useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, thanks for digging in and catching the right syntax. Really Helpful!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, using {{changelog.Fix Version.fromString}} worked! No more blanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has anyone been able to solve this scenario?
We usually use multiple fix versions for each task, when you change value completely - no issues, you get alert 'old - xxx, new - yyy'. But when you simply add another value, then instead of getting 'old - xxx, new - xxx, yyy', old value is shown as empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @John Funk ,
Multi value fields and value change is a bit of a tricky one. We've got:
https://codebarrel.atlassian.net/browse/AUT-2013 and https://jira.atlassian.com/browse/JRACLOUD-74953
The issue here is the way that the changelog treats the value change we get two entries I think. One for the old value and one for the new value. So we get the latest entry and have the new value but not the old. Its something like that. Bit of a known issue that requires quite a rework.
Hope that helps!
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to solve this issue with a small work around. They way I did it was to create a hidden field that when the FixVersion changes, I copy the changed value into it ... the next time it changes, I pull from that value as the 'old value' and then after reporting, update the value. Screen shot shows the rule and the resultant email screen shots.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hope you are doing well
Is this working still?
I am still getting blank with from and to strings. any advice to sort the issue?
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.
Hi @OlehK
Hope you doing good!
Can you show your complete code with the automation rule. I have tried with replacing fixVersions to Fix version and it still failed. Also tried with the details shared and it's still not working.
If you can share the complete code it will be helpful.
My requirement is any changes to fix version should be notified with old version details and new version details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.