Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,854
Community Members
 
Community Events
184
Community Groups

ScriptRunner Cloud Creating Issue Link

When running some code in a Script Listener, specifically this POST:

def newLink = post("rest/api/3/issueLink")
.header("Content-Type", "application/json")
.body(
[
type: {name: "Cloners"},
inwardIssue: {key: newEpic.key},
outwardIssue: {key: issue.key}
])
.asString()

 

I am seeing the following error: 

 

2018-10-23 17:56:25.396 WARN - POST request to rest/api/3/issueLink returned an error code: status: 400 - Bad Request
body: {"errorMessages":["Unrecognized field \"delegate\" (Class com.atlassian.jira.issue.fields.rest.json.beans.IssueLinkTypeJsonBean), not marked as ignorable\n at [Source: com.atlassian.plugin.connect.plugin.auth.scope.InputConsumingHttpServletRequest$1@1ab82f46; line: 1, column: 22] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.LinkIssueRequestJsonBean[\"type\"]->com.atlassian.jira.issue.fields.rest.json.beans.IssueLinkTypeJsonBean[\"delegate\"])"]}

 

I don't understand this error as "Delegate" is not even a field that exists within our JIRA Instance. Is there any better way to do Issue Link creation? Have tried a few ways now...

1 answer

0 votes
Kristian Walker _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.
Nov 05, 2018

Hi Andrew,

Thank you for your question.

 

I have created an example Script Console script which can be ran from the Script Console and shows how to link two issues together. 

You can view the example script here and can use this example code as a reference to see the syntax that must be specified to link issues together so that you can use this approach inside of your script. 

If this response has answered your question can you please mark it  as accepted so that other users searching for a similar question can see that this is a correct answer.

Regards,
Kristian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events