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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to close the ticket with updated using scriptrunner Groovy script.

Hi Team,

I have a requirement to close the particular issue type of my project using some comments. Need your help to have a code in Groovy Script. Thanks in Advance for your help.

1 answer

Thanks, Martin for the response.

Below is another question that is on high priority. Please give some guidance I am new to script runner.


I need some help. How to get the value of the custom field from the issue type. Then printing and using that variable further.

I have an issue type with the name "TEST1-5". when trying to print the value for issue and csChangeArea I am getting "NULL" value. Please help and suggest how to use th


import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.ModifiedValue;
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder;

def issueManager = ComponentAccessor.getIssueManager()
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("TEST1-5")
def csChangeArea = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("Username")"My script variable new value : " + issue)"Custom field value : " + csChangeArea)

Hi @mohit panwar , create a new question for new topic, please. If you mention me, I will get notification and I can check it :)

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you