Hello,
I am currently handling the issue updated event on the java server side of jira. From there on I am passing the updated values to a different system. This communication between Jira and the other system is fairly simple realized through rest calls.
@EventListener
public void onIssueEvent(IssueEvent issueEvent) {
// pass on data to different system
}
What I am searching now, is by idea also easy. After I passed the data on, I want to pop up a notification in Jira about the return status of the data pass. For example: "Successfully sent".
Problem is, it's actually not that easy. In my research I found out a few things:
So either I could pop a message from the onIssueEvent method somehow, or I create a custom event and raise it in onIssueEvent and catch it in a javascript. For both parts I don't really know how to do it. If you know how to manage it over a custom event, could you give a simple example (Event-Class, raise event, catch event jscript)? Of course the event would need to carry a tiny bit of information about the sending status.
I might not be seeing a different solution right now, so I am grateful for any kind of help in that direction.
Kind regards
Chris
there's UserMessageUtil class which can help you generate three kinds of default jira popups:
https://jamieechlin.atlassian.net/wiki/spaces/GRV/pages/36929563/Providing+feedback+from+scripts
Thank you.
That sounds very much like a solution I need. On Jira I am running Adaptavist Scriptrunner for Jira with Version 4.3.15.
Although I am not sure how to include the dependency right, since this:
<dependency>
<groupId>com.adaptavist.pom</groupId>
<artifactId>scriptrunner-jira-standard</artifactId>
<version>4.3.15</version>
<type>provided</type>
</dependency>
is not working. Though I think an independent solution would be much better, I'll take this if you could point me to how to include the dependency correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It totally slipped my mind that it's scriptrunner's feature, so I don't really know how to use it anywhere besides jira.
But since you already have it (scriptrunner) why not use it's own listeners?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok so I guess you need to put in a script for the event. So far I have never used Scriptrunner myself, since it was used by other developers for minor scripts. I didn't see at first that your link is only to write scripts with that plugin. I'm really looking for a solution that integrates into my plugin java code.
The thing is, that I already finished all the work with listeners, data transaction etc.
The only thing missing is a notification for the user, if something went wrong. But still your hint does help, as it may provide a (more costly) backup plan.
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.