Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bulk change/merge email addresses

John Cherian
December 11, 2020

Hi,

 

 

Our organization has changed from amtrust mobile to Bolttech. We have some users on Atlassian still using the old amtrust email. On the single user’s page, I cannot see an option to change the email address. How can we do this?

 

Also, how to bulk edit for all existing amtrust users?

 

 

If we send invite to the user’s bolttech email and then delete the old amtrust email, will it affect the user account, issues, groups, projects etc?

 

As per the forums, there is no way to merge the two emails? Or has there been any update or new improvement?

 

2 answers

1 accepted

3 votes
Answer accepted
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 8, 2013

The Resource definition looks good for me, the name must be preceded with "java:comp/env/" in your script, so "java:comp/env/JIRA_SupportDB" should do the trick.

I use a resource in the following way.

try {
	// Get Context to connect to database as a datasource
	Context ctx = new InitialContext()
	if (ctx == null) {
		throw new Exception("No Context found!")
	}
	DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/MYDB")
	if (ds) {
		sql = new Sql(ds)
...

In this case the name in the Resorce is "jdbc/MYDB". Be aware of that the <Resource> part must be inside of the <context> in the context.xml

Henning

Mario Prada Arroyo
Contributor
September 9, 2013

Hi Henning!!

that s right, I look like a newbie

Thanks for your time :-)

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 9, 2013

Don't forget to close your connections in a finally{} block...

Robin Knowlton
March 5, 2014

What import was required to resolve the Context class?

When I tried the above code in my groovy script, I got the following error:

Script11.groovy: 96: unable to resolve class Context

@ line 96, column 14.

Context ctx = new InitialContext()

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 5, 2014

import javax.naming.Context

Robin Knowlton
March 5, 2014

Thank-you very much !

0 votes
Jeff Louwerse
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 18, 2015

I am attempting to upgrade from JIRA 5 (don't ask)  and am hitting this issue with scripts that have run for years.  Does this still work in the console either as a script or a file on scriptrunner 3.0.16 and JIRA 6.3.15

my scripts still run as services but if I try to run the files in the console I get 

Cannot instantiate class: org.apache.naming.java.javaURLContextFactory

even this simply block won't run.

import javax.naming.InitialContext
import groovy.sql.Sql
def ds = (new InitialContext()).lookup("java:/comp/env/jdbc/JIRAAUX")
def sql = new Sql(ds)

 

but as I mentioned, put this into a script and run it as a service.. works fine.

I really would prefer to use this method over defining the connection as this allows me to copy files directly from development to production without worrying about changing the connection details.

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 18, 2015

I think this is the same problem as described here: https://jamieechlin.atlassian.net/browse/GRV-544

Jeff Louwerse
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 19, 2015

Thanks Henning. With a little more googling I found this link https://jamieechlin.atlassian.net/wiki/display/GRV/Connecting+to+Databases which lead me down the path to creating an abstract class for creating the connections and for now I am loading that in each script instead of the JNDI. Just wondering everyone else is doing this?

Suggest an answer

Log in or Sign up to answer