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,551,671
Community Members
 
Community Events
184
Community Groups

Link issues from a post function script

 

I need to link two sub tasks.

I've read some posts where such question was discussed:

https://community.atlassian.com/t5/Jira-questions/Script-Runner-Post-function-to-link-back-to-issue/qaq-p/41966

http://www.denizoguz.com/2013/06/29/jiraautomatically-linking-issues-with-a-script-during-create-transition/

from the code provided there I am stuck at this part:

import com.atlassian.jira.ComponentManager; 

def issueLinkTypeManager = componentManager.getComponentInstanceOfType(IssueLinkTypeManager.class);

 I get 

No such property: IssueLinkTypeManager for class
groovy.lang.MissingPropertyException: No such property: IssueLinkTypeManager for class

 As is written at atlassian jira/docs/api/6.2.4

getComponentInstanceOfType(Class<T> clazz)
          Deprecated. since 6.0 - please use the jira-api ComponentAccessor.getComponent(Class) instead

So I've tried to use Component accessor:

import com.atlassian.jira.component.ComponentAccessor;
ComponentAccessor.getComponent(IssueLinkTypeManager.class)

But I get the same error about IssueLinkTypeManager.

1 answer

0 votes
Gaston Valente
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.
Jan 03, 2018

Aleksandr,

You should try with:

ComponentAccesor.getIssueLinkManager()

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events