Forums

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

How to get the id of a specific issue link type?

Priya Thevar October 3, 2013

I want a submission issue link type to be created in my subtask. Follwing is my code.

Collection<IssueLinkType> issueLinkTypes = ((IssueLinkTypeManager) ComponentManager.getComponentInstanceOfType(IssueLinkTypeManager.class)).getIssueLinkTypes();

def IssueLinkType submit = issueLinkTypes.find{it.name = "Submission"}

def iltkId = submit.getId() // Get the Id of the issue link type
log.warn(" submit link" +iltkId);
This code throws error saying Cannot set readonly property: name for class: com.atlassian.jira.issue.link.IssueLinkTypeImpl
At the end I'm using a hard coded value for submission issue link type id as of now.
issueLinkManager.createIssueLink(issue.getId(),newSubtask.getId(),10200,0,user)
Can someone help me what's the error about?

1 answer

1 vote
Bharadwaj Jannu
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.
October 3, 2013
Priya Thevar October 3, 2013

Thankyou so much. The link worked .

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events