Hello,
I want to 'read only' field fixVersion in Jira.
In edit screen in is working okay, But in view screen it is not read only and users can edit it.
I tried to use this intialiser without success:
def customField = getFieldByName("Fix Version/s")
customField.setAllowInlineEdit(false)
What am I doing wrong?
Thank you,
Daniel
The issue you're working with is just an object in memory. You have to use either the issueManger or the issueService to persist the change to the database
I see you've instantiated the issueService and issueInputParameters but haven't used them.
Instead of using issue.setComponent, try to use the issueInputParameters:
import com.atlassian.jira.event.type.EventDispatchOption
/* your existing code */
if (ComponentValue) {
log.debug(ComponentValue)
issueInputParameters.setComponentsIds(ComponentValue.id)
def updateValidationResult = issueService.validateUpdate(user, issue.id, issueInputParameters
if(updateValidationResult.isValid()){
issueServerice.update(user, updateValidationResult, EnventDispacthOption.DO_NOT_DISPATCH, false)
}
}
If you want event and email dispatched, you can omit those last 2 parameters or set them accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.