Forums

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

Get status and Resolution for a linked issue

Brenda December 13, 2018

Hi, I really need your heeelp,

I need to change the status of an issue if following condition is true:

 

I have a linked Issue of type "Is Reviewed by"

linkedIssue status = close

and linkedIssue resolution = done

 

I know I have to use a fast track function to change the status but for the condition I have an error, What I'm doing:

 

issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('is reviewed by')

linkedIssues.getAsString("status") == ["Closed"]
linkedIssues.getAsString("resolution")==["Done"]

 

'linkedissues' is not recognized.

 

1 answer

1 accepted

0 votes
Answer accepted
Marc Minten (EVS)
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.
December 13, 2018

Shouldn't you write

def linkedIssues = issueLinkManager.getOutwardLinks(...
linkedIssues.getAsString(...

?

Brenda December 13, 2018

Hi Marc, thx!! I've tried:

 

def LinkedIssues = issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('Is Reviewed by')
LinkedIssues.getAsString('Status') = 'Closed'
LinkedIssues.getAsString('Resolution') ='Done'

 

But I had: "LinkedIssues.getAsString('Status')"  is a method call expression, but it should be a variable expression

 

:/

Marc Minten (EVS)
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.
December 13, 2018

Sorry, I did not look in detaat

Marc Minten (EVS)
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.
December 13, 2018

Sorry, I did not look in detail at your code.

You should loop over the linkedIssues, and test for each issue :

...
linkedIssue.getStatus().getName() == 'Closed'
linkedIssue.getResolution().getName() == 'Done'
...
Brenda December 17, 2018

Thanks for you help Marc!!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events