Move issue and don't change the PKEY

MarcoC March 18, 2013

Hi!

I wanto to never change the PKEY (ABC-123) of an issue when I move it to another project... It is possible?

4 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2013

No.

An issue will always have the project key as the first part of it's ID.

(unless Atlassian redesign how it's all structured, which I doubt. Although you never know. I'm not sure that it even makes sense to see an issue like ABC-123 and not be able to tell that it's in project XYZ because the key is "wrong")

MarcoC March 18, 2013

... and can't I remove the "change" from ABC-123 to DEF-456?

Séb P.
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.
March 18, 2013

As far as I know, a moved issue is still accessible by its old key, so why do you need them to never change?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2013

You could write something to remove that from the history, but that kind of destroys the point of using an issue tracker because you would be destroying the information that the issue was in a different project.

MarcoC March 20, 2013

so there isn't a wonderful buttom or settings like "never change pkey in move operation"... :-)

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2013

No. If you move issues into another project, you must inherit the new project key. The whole of Jira relies on that.

0 votes
MarcoC March 20, 2013

Alright... I try to explain why I wanto to have an immutable key.

At the begin I put all my issues in a Project named "EUREKA" where I have all the ideas put in.

After a while, the user analyse that ideas and move it in the different project that I have...

If I move, the PKEY will change, and I can't take notes of all the changes of the KEY. I want a initially PKEY, like IDEA-1, and it have to be the same, every time I move in the projects...

I know that I have the ID of the issues in the DB, and I'm using it for the query that I made for analyse... but I want to see this uniquew and immubatle ID in the issue!

Best regards,

Marco

0 votes
sohil chhabriya March 19, 2013

@ Nic Brough

In database table (jiraissue) i have fields ID, pkey , project.

now to achieve issue move through calling a listener i have to change pkey and project..

how will i achieve it?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2013

That's not quite the same question, and isn't that relevant here.

You might want to read/follow this one though: https://answers.atlassian.com/questions/150062/change-project-with-issueservice

Like Kuharev Artem likes this
sohil chhabriya March 20, 2013

Well thanks @Nic that seems to be near to what i require.

Actually m searching for that answer since long. and wanted YOU to reply it. as the question here was totally opposite to my question i expected that you will have an eye to my question too.... :) Thanks for the answer and please support me if i get any difficulty with my jira development. :)

how can i directly put my questions to you?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2013

Second thought, prompted by the discussion though. Are you looking for an immutable key for an issue?

The issue-id in the database does not ever change, so you could expose that to the user as well as the issue-key.

The problem there is that there's no url to point a user at, although I have a feeling I saw something that made the issue-id usable as well as the key.

MarcoC March 18, 2013

Ok, I know that the "issueID" is unique and never change... and it could be the answer of my problem...

But I'm sure that now there is another problem... I can't change the PKEY in the issues field (what I see in the page), with the IssueID... right?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2013

No, you're not supposed to be able to change it. Ever.

An issue key in Jira is designed to be unique and indicate the project an issue is in. It is not arbitrary or user-settable. It's deliberately immutable within a project because humans simply can't cope with changing keys, especially when there's no clear logic behind it. ("Why did my key change from abc-123 to xyz-456" is acceptable and understandable when you say "changed project", but "because Fred felt like renaming it as penguin" is not)

If you need another arbitrary reference, I'd suggest a custom field, but you'll need to find or write a plugin to provide a custom field which will prevent duplicate entries.

MarcoC March 18, 2013

Ok, thank you very much!!

Suggest an answer

Log in or Sign up to answer