Im currently trying to create custom issue types on addon installation, is there any way i can listen to events like in the jira server (life cycle events).Im writing the plugin using Spring boot connect app framework.
@DonPereraYou can do that. Here is brief idea,
"lifecycle": { "installed": "/installed"}
@DPKJ
Can you post a sample method signature for the particular , i tried with admin scope but it goes and hits on the following
Mapped to public org.springframework.http.ResponseEntity<java.lang.Void> com.atlassian.connect.spring.internal.lifecycle.LifecycleController.installed(com.atlassian.connect.spring.internal.lifecycle.LifecycleEvent,com.atlassian.connect.spring.AtlassianHostUser)
not to the endpoint i defined.
Thanks!!!
@DonPerera Two things,
If you are not familiar with listening to custom events in Sprint framework, checkout this,
Your sample method code will look like this,
@EventListenerpublic void processAddonInstalledEvent(AddonInstalledEvent event) {//Do event processing here}
make sure you put this method in a bean.
Happy coding!!!
@DPKJ Thank you very much.
Works like a charm.
@Componentpublic class EventManager {@EventListenerpublic void processAddonInstalledEvent(AddonInstalledEvent event) { //logic}
@EventListenerpublic void processAddonUninstalledEvent(AddonUninstalledEvent event) { //logic}
It looks like you're new here. Sign in or register to get started.