Moved issues in Jira

192 views
Skip to first unread message

Yves B

unread,
May 13, 2014, 5:39:51 PM5/13/14
to atlassian-...@googlegroups.com
There are some situations where a plugin will have to know what previous issue keys a particular issue had, after it have been moved over to another project.

Example: in my SVN plugin if a customer has an issue PROJA-123 that has been moved at one point to PROJB-45, the customer still wants to have the full history of all the SVN commits he's done for that JIRA issue.
The issue has the same ID but changed its KEY.

I can't find a way with the REST API to query for this information. Sure enough, if I query for the old name (PROJA-123), the new name (PROJB-45) or the ID, I transparently receive info about the new one (PROJB-45).
But how could I know of this link?
I can't find a REST API  to get the equivalent of the History tab in Jira.

Thanks for your help
Yves

Seb Ruiz

unread,
May 13, 2014, 5:47:45 PM5/13/14
to atlassian-...@googlegroups.com
Hi Yves,

I am not sure of an answer to this... sorry...

I think the best place to ask this question is on answers.atlassian.com - as there will be much more JIRA knowledge lurking around there.

hth
Seb


--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Seb Ruiz
Atlassian

Tim Pettersen

unread,
May 13, 2014, 5:53:06 PM5/13/14
to atlassian-...@googlegroups.com
Hi Yves,

You can retrieve issue history by passing "changelog" as the "expand" query parameter in the JIRA response, e.g. :


cheers,
Tim
Tim Pettersen
C: 415 503 8377

$10 Starter licenses... w00t! | http://www.atlassian.com

Yves B

unread,
May 13, 2014, 5:57:54 PM5/13/14
to atlassian-...@googlegroups.com
Thanks Tim,
What I need is indeed in there

Florian Bauer

unread,
May 14, 2014, 7:21:28 AM5/14/14
to atlassian-...@googlegroups.com
I tried to install a private version of my addon by 'upload addon'  button within my jira instance but got the message:

An error occurred while installing the add-on. Refer to the logs for more information.

my heroku ACE logs shows nothing - where can I find the jira instance logs or how can I dive deeper here?

Thanks,

Florian



--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kind Regards,
Florian Bauer
http://bauer-information-technology.com
+49 (0) 175 400 97 15

Yves Berquin

unread,
Jul 3, 2014, 10:11:37 AM7/3/14
to atlassian-...@googlegroups.com
Same topic. Another use case.
I found out that now in OnDemand users can change the keys of the projects.

Project "DEMO" can be renamed "DEMO1".
This is not reflected in the .../rest/api/2/issue/KEY?expand=changelog API answer at all. All issues with keys DEMO-123 are silently renamed DEMO1-123.

Is there a way to query the renaming of project keys?

Thanks for your efficient help
Yves

Patrick Streule

unread,
Jul 3, 2014, 1:30:07 PM7/3/14
to atlassian-...@googlegroups.com
Yves,

The best strategy is not to rely on issue keys, but use the issue ID instead. That's also what the REST response returns as the canonical self link:
.../rest/api/2/issue/10000

I also think that the old issue keys continue to work after the rename, but the response will contain the new issue key. So you could use that to update the issue key on your end (if relying on issue IDs was not an option for you).

Regards,
Patrick


The project link in the rest response will point to the 

Yves Berquin

unread,
Jul 3, 2014, 2:56:33 PM7/3/14
to atlassian-...@googlegroups.com
Patrick,

I only understand now the importance of dealing only with the ID, not the key.
It often means one more trip to a server to get the key that matches the id I would store in the DB, but you're right, there's no way to deal reliably otherwise.

Thanks
Yves 

On Tuesday, May 13, 2014 11:39:51 PM UTC+2, Yves Berquin wrote:

Patrick Streule

unread,
Jul 3, 2014, 3:30:04 PM7/3/14
to atlassian-...@googlegroups.com
Yves,

Under what circumstances do you need the key? Just wondering if there are cases where the ID isn't available that force you do do an additional roundtrip to JIRA.

Regards,
Patrick

Yves Berquin

unread,
Jul 3, 2014, 3:40:40 PM7/3/14
to atlassian-...@googlegroups.com
What I meant is that I am storing the ID in my DB, but I was also expecting to be able to store the key.

In order to display anything related to Jira in my application (which is separated from Jira, but linked through an add-on), I'd like to show the user the Jira issue key and the title.
Both are volatile enough that I will have to retrieve them from Jira before I can even start to display anything to the user.
If at least the key was kinda permanent, I could have shown only the key, and then a little later (through a javascript callback) the title.

Remember it takes sometime much more than 2 seconds to get a simple set of information like that so this whole round-trip is a bit sad, but I understand now it's unavoidable.

Now, given the fact that I only deal with a limited set of Jira issue links in my application I could also poll the REST API to keep a relatively fresh data set on my side, but I know how you'd hate for an add-on to make too many calls to the REST API.

Thanks for your concern
Yves



--
You received this message because you are subscribed to a topic in the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/atlassian-connect-dev/h3pMHLl5Tdg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to atlassian-connec...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages