I have a plugin that is setting "resolution" by adding it to the issueInputParameters, validating, and saving. This works as expected and the change is reflected on the issue. However, "resolutiondate" is still null. Most of the things I've read say that the "resolutiondate" is automatically derived from the last time the "resolution" was set (which would be fine if it worked). I have also tried firing an IssueEvent with EventType ISSUE_RESOLVED_ID after the save, but that hasn't helped.
//Code to set the resolution
ResolutionManager resolutionMananger = ComponentAccessor.getComponent(ResolutionManager.class);
Resolution resolution = resolutionMananger.getResolutionByName(value);
//Code to validate and save
IssueService.UpdateValidationResult updateValidationResult =
issueService.validateUpdate(user, issue.getId(), issueInputParameters);
IssueResult updateResult = issueService.update(user, updateValidationResult);
//Code to fire an issue resolved event
EventPublisher eventPublisher = ComponentAccessor.getComponent(EventPublisher.class);
HashMap<String,Object> paramMap = new HashMap<String,Object>();
eventPublisher.publish(new IssueEvent(issue, paramMap, user, EventType.ISSUE_RESOLVED_ID));
IssueInputParameters does have a setResolutionDate function, but it doesn't work (which I didn't expect it to based one what I've read). Is there a way to force an issue to re-calculate the "resolutiondate"?
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