Hi all,
I'm writing some listeners in SR cloud, to alert me when some interesting stuff happens.
I'd like to be able to retrieve, from some binding variable, the context of the script:
- which script is it? I didn't find a way to retrieve anything better than "this.class", which is pretty useless to identify the script itself. I'd like my alerts to include a message like: "This alert comes from <script name or uuid here>"
- who triggered the listener? Sometimes I'm able to retrieve this info in a smart way, for instance if in a "comment deleted" listener, I can retrieve the last changelog author. But what about a "board deleted" listener? Or "project deleted"? I'd like my alerts to tell me who did the action that triggered the alert, so I can reach them and ask for explanations, when needed
Best regards,
Fede
This is the answer that I received from an Adaptavist developer:
---
Based on the details, if you are looking into triggered events, you can use the listener's correlation ID and access the log from the script log. You can search for the logs from there based on the correlation ID. If you are looking for the user that triggers the event, you can access it from the execution history and within the payload tab.
---
So, apparently there's no way to retrieve the info from the execution of the script itself, and manually parsing the logs is the only solution (for now).
Hi, @Fede B.. I moved your question to App Central, where questions about Atlassian Marketplace products should be posted. Also, I added some additional tags to hopefully draw the right eyeballs to your post.
That said, I suggest you contact the Scriptrunner support team directly for a faster/better response.
Best of luck,
-dave
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.