The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • I'd like to capture the project key when an issue is created in a custom field called "Original Project Key"

I'd like to capture the project key when an issue is created in a custom field called "Original Project Key"

Ted Nienstedt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 14, 2013

I'd like to capture the project key when an issue is created in a custom field called "Original Project Key". Having this is useful for us if/when the issue is moved to another project. Is there a way to do it with a post function script? And, recording they key rather than the project name is preferable for brevity sake.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Jobin Kuruvilla [Adaptavist]
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.
October 14, 2013

You can try using the "Copy Value From Field" post function in JIRA Suite utilities plugin. Source field will be "Key" and destination field can be a text custom field. Haven't tried it myself but seems that will work.

Christian Czaia [Decadis AG]
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.
October 15, 2013

I've done it that way. Works like a charm...

0 votes
Ted Nienstedt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 15, 2013

Well, I'm currently looking at https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions#PostFunctions-Copyonefieldtoanotherusingregexp as an example, becuase what I want is the project key (before the dash of the issue key,) but haven't got that approach working yet. I'm I over complicating it?

thanks

Christian Czaia [Decadis AG]
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.
October 15, 2013

Jamie's script runner is what I would go for so I guess you hit the spot. I guess you have to do dome scripting since you're looking for a substring. Other than that you could have a look at this plugin :

https://marketplace.atlassian.com/plugins/com.fca.jira.plugins.workflowToolbox.workflow-toolbox

Cheers