After any type of editing issue(Normal Edit,Quick Edit,Inline Edit,SOAP Edit,REST Edit), I need to execute a
functionality immediately when update button is pressed.
How can we achieve this using Events/Listeners?
Listeners sometimes are not getting called if I do no changes to the form, but required to get called. e.g: If a customfield is selected then it should create an issue and link with the current issue. If I delete that link and simply updated the edit form, then listener should be invoked and it should again create a new issue and link with the current issue. but this is not happening with the listeners approach. Sometimes listeners are getting called(because it is based on ISSUE_UPDATED event) when they is no requirement of call. e.g: For Issue tab panels change and updations, it is getting called. this is unneccessarily happening with listeners approach. Hence I choose the method in https://answers.atlassian.com/questions/83433/validator-support-for-edit-quick-edit-and-soap for edit, quickedit and inline edit. Although this is little clumpsy, we can perform our expected results if well documented.
I tried to use Listener on Edit action in the following way
public class GlobalEditPostFunction implements InitializingBean,DisposableBean
private final EventPublisher eventPublisher;
public GlobalEditPostFunction(EventPublisher eventPublisher)
* Called when the plugin has been enabled.
* @throws Exception
public void afterPropertiesSet() throws Exception
// register ourselves with the EventPublisher
* Called when the plugin is being disabled or removed.
* @throws Exception
public void destroy() throws Exception
// unregister ourselves with the EventPublisher
public void onIssueEvent(IssueEvent issueEvent)
Long eventTypeId = issueEvent.getEventTypeId();
MutableIssue issue = (MutableIssue)issueEvent.getIssue();
But no changes are seen on console i.e. Sys out
Well, that's basically a copy of the code at https://developer.atlassian.com/display/JIRADEV/Writing+JIRA+event+listeners+with+the+atlassian-event+library with a renamed class (I'd suggest changing that name a bit as it implies it's a post-function to me, although it's clearly not when you read it)
As you're not getting "Test" in your output, that implies it's not running at all, so you need to debug why. Check that the listener is loading ok at Jira startup, check it's enabled, and check that you've added and configured it correctly.
Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot