I have a function that transitions issues:
static def updateIssueStatus(Issue issue, ApplicationUser user, int actionID, String statusID="", String resolutionID="") {
IssueInputParameters issueInputParameters = ComponentAccessor.issueService.newIssueInputParameters()
issueInputParameters.with {
setResolutionId(resolutionID)
setStatusId(statusID)
setSkipScreenCheck(true)
}
TransitionOptions transitionOptions = new TransitionOptions.Builder().skipConditions().skipPermissions().skipValidators().build()
IssueService.TransitionValidationResult validationResult = ComponentAccessor.issueService.validateTransition(user, issue.id, actionID, issueInputParameters, transitionOptions)
if (validationResult.isValid()) {
IssueService.IssueResult issueResult = ComponentAccessor.issueService.transition(user, validationResult)
if (!issueResult.isValid()) {
log.error("Failed to transition parent ${issue.key}, errors: ${issueResult.errorCollection}")
}
} else {
log.error("Could not transition parent ${issue.key}, errors: ${validationResult.errorCollection}")
log.error("validationResult getFieldValuesHolder: ${validationResult.getFieldValuesHolder()}")
}
}
It works perfectly fine with default language setting. But if it's different (French in my case) it throws error:
Could not transition, errors: Errors: {customfield_33000=Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a".}
It is a date field and it's current value is indeed in validationResult.getFieldValuesHolder and format looks like this:
Params: {null=[17/avr./24 11:01 AM]}
However it's not in issueInputParameters
How can I fix this assuming I have to keep user's language setting
Atlassian response
Unfortunately, until bug (JRASERVER-62929) is fixed, the only workaround we found, are the ones described in the bug.
We'd encourage you to visit the bug ticket and click on This affects my team to increase its visibility, as well as adding yourself as a watcher to be kept informed as to the state of the bug moving forward. That way, if the ticket is updated by our development team, you'll be notified via email.
Atlassian response
Unfortunately, until bug (JRASERVER-62929) is fixed, the only workaround we found, are the ones described in the bug.
We'd encourage you to visit the bug ticket and click on This affects my team to increase its visibility, as well as adding yourself as a watcher to be kept informed as to the state of the bug moving forward. That way, if the ticket is updated by our development team, you'll be notified via email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Important note: The user who’s triggering event is different from the user (bit) which trying to transition the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.