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 get the Project Key from the ProjectUpdatedDetailedChangesEvent


I have a listener on all my Jira project on a change of Project Name.

So I'm using the event ProjectUpdatedDetailedChangesEvent

Ihave no problem finding if the project name have change, but there is no attribute in this class to know what is the name of the project. How can I get the project where the change have been made? Is there a way to get the Key?

Am I looking correctly? This is the class im referring to :

PS : Im using Scriptrunner in Data Center

1 answer

1 accepted

0 votes
Answer accepted
Ram Kumar Aravindakshan _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.
May 02, 2023 • edited

Hi @Christopher Gervais 

Instead of using ProjectUpdatedDetailedChangesEvent, why not just use ProjectUpdatedEvent?

The ProjectUpdatedDetailsChangedEvent will not be able to provide you with the required information you are looking for because that event is configured only to return boolean results to verify if there has been any change made to the project properties, which you can see in the Jira Api doc link that you have shared. You can only obtain Avatar and Source Type details when using the ProjectUpdatedDetailsChangedEvent.

Instead, if you use ProjectUpdatedEvent, you can do basic logging if any change has been made to the project's attributes. 

You can retrieve the project's old attributes (i.e. for its last attribute before the change) and its current attributes. In this case, the Project's Key and Name and compare the changes made.

Below is a sample working code for your reference:-

log.warn "=======>>> Old Key: ${event.oldProject.key}, Old Project Name: ${}"

log.warn "=======>>> Current Key: ${event.project.key}, Current Project Name: ${}"

Below is a screenshot for your reference:-


The code basically prints out the old project key and name along with the current project key and name. From the result, you will see the differences made to the project.

Below is a screenshot of the sample output produced:-

Screenshot from 2023-05-02 16.00.13.png

I hope this helps to answer your question. :-)

Thank you and Kind regards,

Thank you Ram! I will use this solution but at first I was trying to find a way with the other event to limit the number of runs the listener will launch

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events