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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,556,290
Community Members
 
Community Events
184
Community Groups

Adding projects to an existing listener programmatically...

This is a SCRIPTRUNNER FOR JIRA question...

I have a listener on the issue created event that needs to be applied to a large list (300+) of projects in specific categories.  Our instance has 1,000s of project so doing this manually would be very tedious.  And no, I can't make it global as the logic is specific to these projects.

Is it possible to programmatically add projects to an existing listener?  Are there any Java classes available to modify a listener and are they documented somewhere?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 09, 2022

You could do it with SR, yes, but you'd need to know the Scriptrunner API because you'll be making calls to update stuff handled inside SR.

It might actually be easier to 

1) Add some code to the beginning of the listener, some that looks at the project (and maybe other data?) for the issue in the event and decides whether to proceed or not.

2) Remove all the current "work for project x", so that the listener runs for every project

i.e. move the decision to code which you have easier access to.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events