I have code that sets the default value for resolution and works fine in the the first option becomes the default.
Is there a way to have the default option = "Please Select" then the defined values
import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION
if (getActionName() == "Accepted") {
def constantsManager = ComponentAccessor.constantsManager
def allowedResolutions = constantsManager.resolutions.findAll {
it.name in ["Done", "Future Release", "Live"]
}
getFieldById(RESOLUTION).setFieldOptions(allowedResolutions)
}
else {if (getActionName() == "Completed") {
def constantsManager = ComponentAccessor.constantsManager
def allowedResolutions = constantsManager.resolutions.findAll {
it.name in ["Done", "Future Release", "Live"]
}
getFieldById(RESOLUTION).setFieldOptions(allowedResolutions)
}}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.