Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Link multiple tickets while creating ticket with automation.

Rajesh Konda
Contributor
April 9, 2024

Hi Team,

 

Have a requirement to create a ticket based on schedule interval and they want to link 2 tickets to that auto create ticket. Have tried adding one on the linked issue and the other on the More action. The one on the linked issue worked and displayed on the ticket, however the link added Json not worked. So i have added both links in json code, this time it wasn't linked any one. Can any one suggest me please. Sharing the code used on the automation.

Code : 

 

{
"fields": {
"issueLinks": [
{
"add": {
"type": {
"name": "relates to"
},
"outwardIssue": {
"key": "{{CMB-2457}}"
}
}
},
{
"add": {
"type": {
"name": "relates to"
},
"outwardIssue": {
"key": "{{CMB-4100}}"
}
}
}
]
}

}

 

1 answer

0 votes
Sebastian Krzewiński
Community Champion
April 9, 2024

Hi @Rajesh Konda 

 

As I understand CMB-4100 and CMB-2457 are tickets in your Jira. In that case you can't use {{ }} tags with issue keys. {{ }} are reserved for smart values. 

IMO is shoulbe be "key":"CMB-4100"

 

More info: https://confluence.atlassian.com/jirakb/how-to-use-rest-api-to-add-issue-links-in-jira-issues-939932271.html

 

Regards,

Seba

Rajesh Konda
Contributor
April 9, 2024

Hi @Sebastian Krzewiński  Thanks for the link, have tried with it. Getting an error as 

 (Too many operations (2) provided for field 'issuelinks'. We support at most 1 operation for this field. (issuelinks)). May be automation will not allow to multiple issue linking?

Sebastian Krzewiński
Community Champion
April 9, 2024

Technically in Jira Cloud UI you are also linking issue by issue (not in a bulk) so I can believe that Jira automation is blocking that. 

You can split this action into 2 seperate.

Like Rajesh Konda likes this
Bill Sheboy
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.
April 9, 2024

Hi @Rajesh Konda 

Adding to Sebastian's answer...

If you read the article provided, there is an open defect that only one link may be added when an issue is created or edited: https://jira.atlassian.com/browse/JRACLOUD-81845

Additionally, there are potential racetrack error problems trying to add / change links too quickly in rules.  I recommend creating your issue, adding a Re-fetch Issue action, and then trying to add the link with a separate action.

Kind regards,
Bill

Like Sebastian Krzewiński likes this
Rajesh Konda
Contributor
April 17, 2024

Thanks @Bill Sheboy , Re-fetch issue action worked. Thanks always.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events