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

Get updated issue status using script runner

kunti pawar May 17, 2018

When I am trying to below code
def getModifiedFields = "";
MutableIssue Issue = issue;
getModifiedFields =Issue.getStatus()
myLog.info ("getStatus== " + getModifiedFields)

I want updated status as In Progress instead of To Do

O/P

IssueConstantImpl[[GenericEntity:Status][sequence,7][statuscategory,2][name,To Do][iconurl,/][description,][id,10000]]

 

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Alexey Matveev
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.
May 18, 2018

Where do you execute the script?

Try to get a reference to the current state of the issue

ComponentAccessor.getIssueManager().getIssueObject(issue.getKey()).getStatus()

kunti pawar May 18, 2018

I am not getting updated status

kunti pawar May 18, 2018

I am executing on script post function on In Progress Workflow

kunti pawar May 18, 2018

status.png

Alexey Matveev
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.
May 18, 2018

You post function should be last in the list of post functions.

kunti pawar May 18, 2018

I am trying to sending data from jira to external system using json script post function

Could you please help me

kunti pawar May 20, 2018

Thanks Alexey Matveev COMMUNITY CHAMPION,

your answer is really help me :) now I am getting status.

And I am getting OK response on calling web service. 

but  I want to check content 

how to check content?

Could you please help me?

 

 

Alexey Matveev
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.
May 20, 2018

What content do you want to check?

TAGS
AUG Leaders

Atlassian Community Events