Hi all,
I have a SR listener that I use to detect stuff that 'escapes' from JIra audits, such as status renaming, and sends me Slack notifications.
Now I'd like my script to be able to detect changes produced on custom fields context, for instance if a custom field is assigned to/removed from a project or issuetype.
I didn't find information about which class has to be imported to get that event data, until now I've found only a way to detect when the cf is edited (by pressing the EDIT button), but not when its context is altered (by pressing the CONFIGURE button).
This is a snippet of my current listener code:
import com.atlassian.jira.event.issue.field.CustomFieldUpdatedEvent
if(event instanceof CustomFieldUpdatedEvent){
eventName = 'Custom Field Updated'
eventObject = event as CustomFieldUpdatedEvent
entityName = eventObject.getCustomField().getUntranslatedName()+"(id: "+eventObject.getCustomField().getId()+")"
entityDetails = "*Original field name*: \n"+eventObject.getOriginalCustomField().getUntranslatedName()+"\n*New field name*: \n"+eventObject.getCustomField().getUntranslatedName()+"\n*Original field type*: \n"+eventObject.getOriginalCustomField().getFieldTypeName()+"\n*New field type*: \n"+eventObject.getCustomField().getFieldTypeName()+"\n*Original field description*: \n"+eventObject.getOriginalCustomField().getUntranslatedDescription()+"\n*New field description*: \n"+eventObject.getCustomField().getUntranslatedDescription()
}
Thanks in advance
In your description, you mentioned:-
Now I'd like my script to be able to detect changes produced on custom fields context, for instance if a custom field is assigned to/removed from a project or issuetype.
I didn't find information about which class has to be imported to get that event data, until now I've found only a way to detect when the cf is edited (by pressing the EDIT button), but not when its context is altered (by pressing the CONFIGURE button).
Unfortunately, this is not doable. Even if you configure it to a Generic Event, modifying the field context will not trigger any change.
Thank you and Kind regards,
Ram
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.