Hello team!
My team works on a service desk and from time to time, we need to consult stuff with other internal teams. For that, we use Slack. I've set up Jira assist so that we can create a new issue type when we escalate and automatically link the "escalation" to our original ticket. This is how I set it up:
- We make a post in Slack to the team we wish to consult with. We then trigger the creation of a ticket with an emoji and a new ticket is created;
- The issue type to where these tickets are created is only for these escalations and feeds into a tea that updates our documentations;
- the issue type has a URL field for the "original ticket" that led to the escalation.
I wrote it in JSON to link the "original ticket" and the "slack escalation" one, but I get this error:
SUPPORT-123 (Field does not support update 'issuelinks' (issuelinks)).
The JSON is set like this:
{
"fields": {
"issueLinks": [
{
"type": {
"outward": "blocks"
},
"inwardIssue": {
"key": "{{issue.fields.customfieldId_40911}}"
}
}
]
}
}
What am I doing wrong here? Is there a way to automate the linking of the issue, considering that ticket creation is not sequential? Can we potentially link based on the same title of the ticket? What is the best way to achieve this linking?
Thank you!
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Are you trying to link the issues during the Issue Create Action in the rule?
If so, although the REST API supports adding one link during issue creation, I have seen problems where the Issue Create Action does not work in rules with linking. As a workaround you could try creating the issue, branching to most recently created issue, and then using the Link Issues Action to perform the link to the trigger issue.
Kind regards,
Bill
Thank you @Bill Sheboy !
The issue here is that the rule will be based on the "cloned" ticket. Only this clone is not created from an automation, but instead from Slack: there is thus no trigger issue nor cloned issues in this scenario.
The way this works is:
1. we receive a ticket on our service desk ( we serve multiple teams, on 9 different issue types) - hence we have multiple tickets being created at the same time;
2. if we need to check stuff with other teams, we use slack for visibility and Jira Assist so we can integrate the two tickets and allow for the status transition on the "original ticket", and for clones into other teams when the "cloned ticket" is closed;
On the "destination Issue type" we have a custom field to collect the url for the "original ticket", but I'm just blocked on how to link both tickets. I may need to rely on manual work here, but i run the risk of the tickets not being linked and other team members not being able to follow up on our escalations. It is also key that we have the feedback loop with our confluence editors so our escalations can lead to self-service via Confluence.
Thank you for any help, really, and thank you for the ask for more detail!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that information.
First, the syntax for that type of JSON edit uses "update" and not "fields":
Next, you describe the custom field contains a URL to the issue which is the target for linking. Thus you may extract just the issue key from that.
Assuming the URL looks like a Jira URL:
your_Jira_site/browse/your_Issue_Key
Please try text functions to get the key only:
{{issue.customfield_40911.substringAfterLast("/")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy You're absolutely brilliant, thank you so much! This has kept me occupied for over a week now, but your input worked like a charm, really.
Thank you so, so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @marianna_taborda ,
Have you checked this article, more specifically the section "Linked issues"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Carlos Garcia Navarro !
Thank you for getting back to me!
Yes, I've checked the linked page and tried a number of different "alternatives", but I still get errors every time, ranging from:
(Unrecognized field "{{issue.issuelinks.outwardIssue.key}}" (Class com.atlassian.jira.issue.fields.rest.json.beans.IssueRefJsonBean), not marked as ignorable at [Source: N/A; line: -1, column: -1] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.LinkIssueRequestJsonBean["outwardIssue"]->com.atlassian.jira.issue.fields.rest.json.beans.IssueRefJsonBean["{{issue.issuelinks.outwardIssue.key}}"]) (issuelinks))
or
(At least one of 'id' or 'key' is required to identify an issue., You must provide one of 'inwardIssue' or 'outwardIssue'. (issuelinks))
or, when using the JSON on the post:
(Field does not support update 'issuelinks' (issuelinks))
In order, the way i wrote it was:
{
"fields": {
"issueLinks": [
{
"type": {
"outward": "blocks"
},
"outwardIssue": {
"key": "{{issue.fields.customfieldId_40911}}"
}
}
]
}
}
What am I doing wrong here? Any idea at all?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.