Auto population of custom field with reporter field value

srinivasp
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 Leaders.
February 25, 2013

While creating an issue, i would like to autopopulate a custom field with reporter field value. Is it possible?

2 answers

1 accepted

2 votes
Answer accepted
pkirkeby
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 Leaders.
February 25, 2013

Hi Srinivas,

You could use the JIRA Misc Workflow Extensions to copy a field value to another field in a post-function of your workflow.

https://marketplace.atlassian.com/plugins/com.innovalog.jmwe.jira-misc-workflow-extensions

1 vote
richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 25, 2013

Hi Srinivas,

You can use a simple javascript to assist you on that. Refer to the code below:

<script type="text/javascript">

reporter = document.getElementById("reporter-field").value;
document.getElementById("customfield_10100").value = reporter;

</script>

You will need to check your id of your customfield, you can easily does that by right click on the text input area and inspect element (chrome and firefox). Then replace the value of customfield_10100 with the value you got.

On how to apply javascript, you can have a look on the documentation below:

https://confluence.atlassian.com/pages/viewpage.action?pageId=317950124

Hope this helps :D cheers!

srinivasp
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 Leaders.
February 25, 2013

Hi Riche, I dont think this would work on JIRA 5. Have you ever tried?

richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 25, 2013

Hi Srinivas,

I have personally verified on my local 5.2.6 and it works. Do let me know what problem have you encountered, you need to paste the codes to the description field (preferable) of the custom field for it to take effect.

Let me know if you have problem executing this.

srinivasp
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 Leaders.
February 26, 2013

Hi Richie, It is working now. I placed the code in wrong place and so I didn't see any change but now i found.

Thanks for your advise, Srinivas

Indranil Mondal February 23, 2016

Hi All,

Should this work for user picker field also? I mean copying reporter value to an user picker field. Its not working as expected. I am having JIRA 6.3 version.

Akhil_vs March 29, 2016

hi richie, i need to populate the component/s field. But i am not getting any id for this field. Kindly help me

Suggest an answer

Log in or Sign up to answer