Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to programmatically register a Service?


I recently saw this question somewhere but now I cannot find it anymore, so please bear with me.

I have a ScriptRunner Script that will execute REST-calls against a backend. Now I possibly need a single call to be repeated, e.g. because the connection attempt failed. For this, I'd like to register a service to be executed at a single time (preferably once, but I suppose if I can register it, I can also de-register it). Preferably I'd also like to be able to pass parameters to that Service, namely the IssueEvent that triggered the script in the first place. Thus, I have the following questions:

  • How can I programmatically, from inside a Groovy script executed by a Listener, register a Service?
  • Can I pass arguments to this Service, so it has access to a specific IssueEvent?

I could solve this by registering a new custom-field and modifying it in case a script fails, but this will put me in a situation where I cannot determine certain parameters I need. The best solution would be to have a Service that receives the very same IssueEvent and especially its changelog.

Thank you in advance :)

0 answers

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events