Hi there,
Hopefully this makes sense and it is not a stupid question. I am trying to check if a custom field value has changed to one of valid values and fire an email if so.
I have created a Builtin Script Listener with the condition:
cfValues['Documentation Status'] != 'None Required' && cfValues['Documentation Status'] != null
which works pretty good but the problem is that it fires the email at every update as long as the above condition is met not checking if the value has changed at all. And I don't want to fire an email if the value has not changed from the original value.
So something like the below would be nice :)
cfValues['Documentation Status'] != 'None Required' && cfValues['Documentation Status'] != null
&& cfValues['Documentation Status'] != originalIssue.cfValues['Documentation Status']
And naturaly that doesn't work :)
Any ideas ?
Cheers,
Baris
def field = event.getChangeLog().getRelated('ChildChangeItem').any{ it.field.toString().equalsIgnoreCase("Documentation Status")}
if (field){
}
this will return bool value
Hi Baris
Something like this is working for me, try:
&& changeItems.any {it.get('field')=='Documentation Status'}
regards,
Paweł
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.