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". 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

1 vote

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.

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

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

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Statuspage

194 years of downtime: looking back on incident data from 2018

Statuspage customers logged more than 194 years of collective incidents in 2018. That’s a whopping 87% increase from the  104 years logged in 2017 , and we aren’t even through December yet....

58 views 1 5
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