How to auto-assign issue using mapping

Hi there,

Perhaps I miss something but haven't found solution so far...

we need to automatically auto-assign issue right after its creation to a dynamically chosen user on the base of reporter.

To choose the assignee some mapping is needed. Every reporter has some default assignee independently in which project/component issue is created.

For example

User1 -> Assignee1

User2 -> Assignee1

User3 -> Assignee2

User4 -> Assignee2

User5 -> Assignee3

and so on...

Perhaps it could be done on the base of user properties but I have no clear idea or solution to this problem. Could you please help me? :)


2 answers

1 votes
Henning Tietgens Community Champion Mar 05, 2013

You can use the Script Runner plugin to script a postfunction, where you map the reporter to the assignee.

we came back to the subject after a while and one more condition appeared... we need to get some hints for determining default assignee using external oracle datasource... i haven't found a solution on how to access external DB using script runner so far... any help would be appreciated :)

Henning Tietgens Community Champion Apr 02, 2013

Using something like this you can access an external database:

Sql sql = null

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/DATABASE")
	if (ds != null) {
		sql = new Sql(ds)
		sql.eachRow(sqlStatement) { row ->
			// ...
} catch (Exception e) {

The datasource DATABASE has to be defined within <Context> section of context.xml in jira/conf similar to something like this:

&lt;Resource name="jdbc/DATABASE" auth="Container" type="javax.sql.DataSource"

After changing context.xml you have to restart JIRA. And you have to use driver matching the database system used.


using post function you can do this

but i need to script it somehow right?

no, just you need to configure postfunction at create transition step

ok this step is simple... but how can i freele choose assignee on the base of different reporters there? it'c completely customized behavior. i don't want to choose assignee from the list, because it depends on reporter - as i wrote in teh first post.

develop your own custmized postfunction, then add condition based on reporter and assign to the default assignee of the reporter

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,755 views 11 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot