what is the listener fired when we change the project from the project field while creating the new issue?

I have a custom field (select list, a dropdown), with multiple values. I want to set a default value for every project in the custom field dropdown list.

I want to use some listner to fire when the project is selected from the project field while creating an issue.

eg: my projects are apple,orange,banana

and list of my custom field values are is orange,red,yellow

so when i select "apple" automatically the custom field default value should set to "red". and for "orange" become "orange" and for "banana" - "yellow"

3 answers

1 accepted

Create a listener(workflow listener) which works on the issue event and update the custom field value

Thanks jobin for your valuable Reply.

i also wanted to know,

when a value of a custom field(a dropdown) is changed -- normally we say it as a onChange function in javascript.

which listener is to be placed into action while we edit the custom field and do certain task, that i define into its function when my custom field value has got change.

You can capture custom field option changes only using javascript. Or in a listener after the issue is submitted. What are you trying to achieve?

well its very troubling situation i have stucked up in...

well i have customized my jira with adding a custom field (a select list) into my create issue form. The values of the custom field are common for all the projects. But for every project there is certain default value within the custom field select list. My need is to automatic select the default value in the custom field to get selected when i change the project selection (in create issue form).

----for which you have give me solution already

Now the another requirenment i am comming up with is to change the project automatically when i edit my custom field value.

i explain it in simple words------ after an issue is created on the view issue page when i change the value of the custom field then automatically the associated project should be assigned to the issue..
in other words its a move issue on the custom field selection

eg: i have 2 dropdown interdependent
[project]--country: india, usa, uk, japan
[custom field]--city: delhi, ny, london, tokoyo

on change of country i wanted city to show delhi as default, and after issue is been created then on edit issue "i wanted to change the country if i change my city from delhi to london"...

hope i am clear with my question....

solution that i think would be applicable is to fire a listener on the change of the custom field value and update the project key value, followed by re-indexing the issue.

thanks to give time to this query!

Changing project is much more than just changing a select list. This is possible only via some javascript but I wouldn't recommend it.

And also with the different custom field options per project, you won't be able to select 'NY' when the project is 'India'.

Thanks jobin

"And also with the different custom field options per project, you won't be able to select 'NY' when the project is 'India'."

i mean that all the cities are always available in the custom field. custom field list is common for all the projects. if i have selected say: india- default in custom field should be delhi. but i manually can select NY also thats up to me.

"Changing project is much more than just changing a select list. This is possible only via some javascript but I wouldn't recommend it."

yes i know its not just to change a list option from one project to another. here is where i am facing a problem. in fact i am finding to add some listener plugin in my jira. Which Listener can catch when the custom field value is been edited from the view issue form?

sorry jobin the method is not working properly!

I feel it has to be done throught the listener , programming, plugins etc

the custome field is not getting changed when we are changing the project field....

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

111 views 0 2
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