How to get and set the sprint field in the jira plugin?

Hi all,

I currently working in one of the jira plugins. I am trying to get the sprint details and update the sprint field values.
How do I get sprint objects or jira agile apis and change sprint custom field value?

I appreciate all your opinions and suggestions.

1 Like

sprint is a customfield for Jira. you can get the value like other customfields, such as:
CustomField sprintCF = customFieldManager.getCustomFieldObject(“customfield_XXX”);
Object val = issue.getCustomFieldValue(sprintCF);

and you can also set the sprint value
issue.setCutomFieldValue(sprintCF, val);

when set value, the issue must be a MutableIssue,
after this ,you need to add this line
issueManage.updateIssue(event.getUser()), issue, EventDispatchOption.DO_NOT_DISPATCH, false)

Thanks for the update. I do not want take the sprint value from the issue. I know the sprint name, how to set that value?