On the selection of dropdown value how to change the assignee

I want to change the name of the assignee on the selection of the Region dropdown value.

How can I achieve this, Please share the code for the same.

2 answers

Hi Vijay,

I want to change the name of Assignee on the selection of custom field value.

for eg:

If the custom field selected value is "1" then Assignee name should be "abc", If the custom field selected value is "2" then Assignee name should be "pqr", if the custom field selected value is "3" then Assignee name should be "xyz" and etc...

Is this possible to change the name of the Assignee on the selection of dropdown value?

Please do the needful.


Hi Najmul,

I havent done this myself yet so cant say the articles I posted helps you directly. They are more specific requests and you have to modifiy accoding to your needs.

I can try it for you once I have time. I will get back if I get it to work.


Hi Vijay,

Many thanks for your support, Please let me know when you get any positive output.



This is working for me

<script type="text/javascript">
  source = document.getElementById('customfield_13750');
  if (source) {
      target = document.getElementById('assignee');
      // Hide the target field if priority isn't critical
      source.onchange=function() {
          if (this.value == <selection option id>) {

You need to change the customfield ID and the assignee name. Also make sure the <selection_option_id> is the id of the option of the customfield and not the option itself. It is a 5 digit number normally.


Thanks Vijay,

I am using your code and working fine but the value is not going to be set into the Assignee field. I tried multiple time with the help of alert.

And found every line is executing properly upto the end. The target.value getting the value also but the value is not coming in the Assignee field on the UI.

Could you please help me to come out form this.

Hi Najmul,

You have to put the code in the description field of the customfield. Go to Administration -> Addons -> Custom Fields -> Find your customfield -> Edit and put the script in description of the field.

Here is the doc link.


This makes it global for all the projects that use the custom field. If you want to do specific to one project, you need to edit it in the field configuration scheme for that project. Doc link below.



Yes Vijay I did in the same place, But I found the above issue. Could you please help me!

If you are doing this at issue creation and before submitting if you want to change value then I guess java script - before performing any event or issue update.

If you want to happen this on issue created, updated event then groovy script do where it will actually change the asignee and email notification will flot


import com.opensymphony.workflow.WorkflowContext
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.event.issue.AbstractIssueEventListener
import com.atlassian.jira.event.issue.IssueEvent
import org.apache.log4j.Logger
import static org.apache.log4j.Level.DEBUG
import com.atlassian.jira.bc.issue.IssueService.UpdateValidationResult
import com.atlassian.jira.bc.issue.IssueService.IssueResult
import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.bc.issue.IssueService.TransitionValidationResult
import com.atlassian.jira.issue.IssueInputParametersImpl
import com.atlassian.jira.issue.IssueInputParameters
import com.atlassian.jira.util.ErrorCollection
import com.atlassian.jira.issue.index.IssueIndexManager

class invoketransition extends AbstractIssueEventListener {
        Logger log = Logger.getLogger(invoketransition.class)
        void issueUpdated (IssueEvent event) {
                def field = event.getChangeLog().getRelated('ChildChangeItem').any{ it.field.toString().equalsIgnoreCase("YourFieldName")}
                if (field){
                	def cfg = customFieldManager.getCustomFieldObjects(issue).find {it.name == "YourFieldName"}
                        def cfgvalue =(List&lt;Group&gt;)issue.getCustomFieldValue(cfg)
                        if (cfgvalue == "1")
                        	//set issue.assignee = "abc"
                        //else if and so on

Hi Paresh,

Thanks for your help,

The code provided by you is not worked in my case I tried several time but nothing seems to be worked.

Could you please share some code that I can write in the Behaviour, So that while filling the field user can see the update what is going on.

Plesse do the needful



Could you help me to resolve the above issue.

Any updates on this issue

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,272 views 5 10
Read article

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