How to close an issue in jira development?

Maharajan M November 19, 2012

hi all,

I had created an "issue" through code. But now the issue's status is in "open". I want to change the status to "Resolved" and "Closed" without manual entry.

Note: Issue having the customfield "Work Type" and it is manadatory filed to resolved or closed.

1 answer

1 accepted

0 votes
Answer accepted
Mizan
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.
November 19, 2012

Refer this question for automatic transitioning an issue and use below code to set value to your customfield

CustomField customField = customFieldManager.getCustomFieldObjectByName( "Work Type" );

IssueChangeHolder changeHolder = new DefaultIssueChangeHolder();
String WorkType="Your work type";// Modify this according to the type of your customfield
//Update the custom field value
customField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customField),WorkType ),changeHolder);

Suggest an answer

Log in or Sign up to answer