Listening to Custom Field Context Creation or Update not possible (Events never triggered)

Bernhard Gruenewaldt September 23, 2018

Hi,

I want to listen to the event when someone creates a context for a custom field.

And of course if someone updates or deletes it.

Currently that does not seem possible. The existing events are not triggered.

com.atlassian.jira.event.issue.field.config.manager.AbstractFieldConfigSchemeEvent
com.atlassian.jira.event.issue.field.config.manager.PrioritySchemeCreatedEvent
com.atlassian.jira.event.issue.field.config.manager.IssueTypeSchemeCreatedEvent

When I do this, then these events are never called:

@EventListener
public void onPrioritySchemeCreatedEvent(PrioritySchemeCreatedEvent prioritySchemeCreatedEvent) {
// Do stuff here
// Never called :(
}
@EventListener
public void onIssueTypeSchemeCreatedEvent(IssueTypeSchemeCreatedEvent issueTypeSchemeCreatedEvent) {
// Do stuff here
// Never called :(
}

But these events work when someone creates, updates or delete a custom field.

com.atlassian.jira.event.issue.field.CustomFieldCreatedEvent 
com.atlassian.jira.event.issue.field.CustomFieldDeletedEvent
com.atlassian.jira.event.issue.field.CustomFieldUpdatedEvent
 

But no event I tried is triggered, when someone is creating a custom field context.

Does someone have a solution? 

1 answer

1 accepted

1 vote
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2018

Hi Bernhard!

Are you setting up a script listener with ScriptRunner or developing something directly (as a plugin) with Jira's Java API? We can retag the question a bit if it's for ScriptRunner to make sure the Adaptavist experts see it. But if it's raw Java, there aren't a ton of eyes on Community that are experts in development.

We have a dedicated Developer Community that might be good to check out for plugin development related questions. Since the topics are more focused, it's easier for other developers to watch the questions coming in and provide guidance.

Cheers,
Daniel

Bernhard Gruenewaldt September 26, 2018

Hi Daniel,

Thanks for your reply. It is really about Java API of JIRA. 

And you are right I should have asked in the developer community in the first place :-/

UPDATE: I wrote with the atlassian Support and currently (as up to JIRA 7.12), there are no such events to listen to for customfield context create/update/delete.

About the event classes mentioned above they are really about Priority Schemes, which were introduced in JIRA Software with 7.6: https://www.atlassian.com/blog/jira-software/jira-software-server-7-6

cheers,

Bernhard

Like Jordan Glassman likes this

Suggest an answer

Log in or Sign up to answer