Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Change email for all Projects using script runner


I need to change project email for all of my projects in JIRA.

There are hundreds of them so I would like to know if script runner is capable of this?

I've been struggling with this for some time now.

1 answer

1 vote

Yes, a one-off script run in the console could use the ProjectManager class to update every project

There are methods of getting the mail, but I cannot see how to set the email for the project.

I've been looking through

and these 2 stand out, but nothing on how to set the email.

Could you give me some pointers ?

Ah, hang on, what exactly do you mean by "project email"?

In the project configuration under notification you can specify the notification scheme and an email.

Scheme: Notification Scheme name
Email: xxx@company.xx

I need to change this email on all projects.

Ah good, I could have pointed you in completely the wrong direction!

I think you combine ProjectManager with ProjectEmail.setFromAddress(email) -

Hi Sigursteinn,

What @Nic Brough _Adaptavist_ said (a one time script using the script console)

So the script that will change it for one project is 

import com.atlassian.core.ofbiz.util.OFBizPropertyUtils
import com.atlassian.jira.component.ComponentAccessor

def newAddress = ""
def project = ComponentAccessor.projectManager.getProjectByCurrentKey("ATG")

def email = OFBizPropertyUtils.getPropertySet(project.getGenericValue())
email.setString("", newAddress)

So for all the projects will be something like 

import com.atlassian.core.ofbiz.util.OFBizPropertyUtils
import com.atlassian.jira.component.ComponentAccessor

newAddress = ""
ComponentAccessor.projectManager.projects.each {
def email = OFBizPropertyUtils.getPropertySet(it.getGenericValue())
email.setString("", newAddress)

Regards, Thanos

Thank you so much Thanos, that did the trick :)

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

65 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you