Hi all,
I'm having a strange issue when I try to release a Version and edit that Version's release date in the same script (see code below). If I try to do one or the other the change takes place just fine, but if I try to do both, only the second change works.
I've tried using VersionManager.update(version) to no avail, I've tried pausing for 10 seconds between function calls, and I've even tried running the two updates concurrently; no dice.
import com.atlassian.jira.component.ComponentAccessor
import java.text.SimpleDateFormat
def project = ComponentAccessor.getProjectManager().getProjectByCurrentKey("project")
def versionManager = ComponentAccessor.getVersionManager()
def version = versionManager.getVersion(project.getId(), "3.4")
Date date = new SimpleDateFormat("yyyy-MM-dd").parse("2017-07-10")
//these are the updates in question
versionManager.releaseVersion(version, true) //this update will not persist
versionManager.editVersionReleaseDate(version, date) //this update will persistAny advice would be great, thanks,
Ben