Hey there,
so Im using Confiform IFTTT in Confluence to create an IssueLink between 2 Jira Tickets that are stored in an entry. (POST Method with JSON)Now I want to delete the Issuelink if the database entry gets modified. But to delete it I need to have the IssueLinkId. Problem is that the POST Method to create an IssueLink doent returen the ID of that newly created Issuelink. So how can I get the ID of a newly created IssueLink which I can then store in my ConfiForm Database?Is there a solution to this?
Hi Maximilian,
It would be better for someone from Confiforms to come help.
@Alex Medved _ConfiForms_
Which REST API service you are using to create a link?
https://developer.atlassian.com/server/jira/platform/rest/v11001/api-group-issuelink/#api-api-2-issuelink-post ?
Hey Alex,
exactly. Im using post-method to create a IssueLink between two Issues. Problem is that the method doesnt respond with the ID of the IssueLink that got created.
So I have no chance of storing the ID of the created IssueLink in Confiforms and delete the connection later.
As I was researching a little and apparently the only way to return the ID of the created IssueLink is via REST-API GET method but for that u need the IssueLinkID as input (which is absolutley nonsens )
{ "update":{ "issuelinks":[ { "add":{ "type":{ "name":"Parent to Child relations", "inward":"is child of", "outward":"is parent of" }, "outwardIssue":{ "key":"[entry.JiraIssueToLink.key]" } } } ] } }
Hello @Maximilian Neufeld
Is there a solution to this?
Short answer.... yes, but it's not pretty.
The non-inclusion of the issueLink ID in the response when creating the link is a very old problem and exists in the equivalent endpoints for both Jira Data Center and Jira Cloud. The feature requests to add that capability are more than a decade old (refer to JRACLOUD-29460 and JRASERVER-29460), and they were closed due to lack of support
The only viable workaround is to get all the issueLinks and their IDs from the Issue first, create the new link(s), get all the issueLinks and their IDs again, then compare the two datasets to find the new one(s). It's ugly, but I dealt with that same problem a very long time ago and found that to be the only solution.... but that might not be viable for your particular situation.
But you do know where you have added this link and have a Jira field in ConfiForms that holds a reference to this Jira issue, right?
Can probably access it through that field, I have been testing it locally and was able to access "link's id" with something like this
issue.fields.issuelinks.outwardIssue.id
(my Jira issue field in ConfiForms is called "issue")
Alex
Yeah I know where I added the link because in my configuration (Field 1 (Jira) and Field2 (Jira)) theres always field2 used as outward issue.
So in your case you would get the ID of the outwardIssue right? - but even with this information you cant delete the created IssueLink as u need the ID of the issueLink itself and not the issue. And there is simply no way to get the ID of the issueLink ...
It looks like you're new here. Sign in or register to get started.