Hi
I'm looking for a way to change issue number is based on custom field value on all issues from specific project.
for example I have issue keys with cf value as following :
TT-123 with value of 57 in 'external issue id' (id=10222)
TT-134 with value of 105 in 'external issue id' (id=10222)
TT-2344 with value of 521 in 'external issue id' (id=10222)
.
.
TT-29000 with value of 11111 in 'external issue id' (id=10222)
I need to change all issues keys of TT project like the following
TT-57 with value of 57 in 'external issue id' (id=10222)
TT-105 with value of 105 in 'external issue id' (id=10222)
TT-521 with value of 521 in 'external issue id' (id=10222)
.
.
TT-11111 with value of 11111 in 'external issue id' (id=10222)
I have JIRA Server 8.5.X
BR
Shlomi
It seems a reaaaaaally bad idea messing around with issue keys.
I'm guessing if you want the key changed you must be showing that field in some automatically generated report.
If this is the case it would be WAY eassier and less risky to simply create a new custom field where you combine the project key with that external issue id and then just adding this field to your report.
Best of luck
Hi Shlomi,
is this some kind of part of an import from a former/external application?
At first sight it sounds you are trying to harmonize issue ids with them of former application.
I only can second to what the other posters, above me, said - but in case you are interested in (probably?!) hearing an alternative solution/approach or just give other Community members something to think through (most are absolutely happy to assist if you are a bit more elaborate on the specific use case), yes, then feel free to go ahead and tell us where the idea originates and what should be done for your team.
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't do this with a simple script, it's a very very complicated thing that you simply should not do.
Two ways you could do it:
1) Write a vast suite of scripts that cover every aspect of changing a key (Jira has no code in it that will do any of this for you, barring a record of old and new key so it can still find an issue with a new key)
2) Use "move issue"
You would have to move every issue out of the current project, use a database hack to reset the key number to a starting point, work out what numbers you want for every issue and them move them back into the project, one at a time, in the order that gives them the key you have chosen for them.
If I were you, I'd step back and look at why you think you want to do this. Of what possible use is it? What are the benefits to your end users? Ask why someone wants this to be done and see if there is
a) a better (easier) way to achieve the goal
b) a good reason to do it this way (I can't think of one)
c) enough money to cover the months of coding or planning you would need to do it this way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.