Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Edit Fields on View Issue Screen

Alvin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2018

Hi Community! Whenever I add behaviour for the Priority (System Field) , I've encountered this problem that I can't edit in-line the Priority (System Field) on view screen, and it says Edit Pop-Up Form Enabled, but I can edit it on Edit Screen

Whenever I delete the Behaviour, in-line editing is possible . Priority Field is on View/Edit Screen, Create Screen and Default.

Is there any way I can do so in-line editing is possible? Below is my code on the behaviour using Priority (System FIeld) as server-side scriptrunner. Thank you!

 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.sal.api.user.UserManager

import static com.atlassian.jira.issue.IssueFieldConstants.PRIORITY

def constantsManager = ComponentAccessor.getConstantsManager()

def userUtil = ComponentAccessor.getUserUtil()
log.debug ComponentAccessor.getComponent(UserManager)

def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
if (userUtil.getGroupNamesForUser(currentUser.name).contains("Change Request Approval Team")) {

def allowedPriorities = constantsManager.getPriorities().findAll() {
it.id.toInteger() in [10200,10201,10202,10203]
}.collectEntries {
[(it.id): it.name]
}

getFieldById(PRIORITY).setFieldOptions(allowedPriorities)

} else if (!userUtil.getGroupNamesForUser(currentUser.name).contains("Change Request Approval Team")) {

def allowedPriorities = constantsManager.getPriorities().findAll() {
it.id.toInteger() in [10202,10203]
}.collectEntries {
[(it.id): it.name]
}

getFieldById(PRIORITY).setFieldOptions(allowedPriorities)
}

1 answer

1 accepted

0 votes
Answer accepted
Alvin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2018

Already configured out, added Initialiser on it

 

def descField = getFieldById("priority")
descField.setAllowInlineEdit(true

Suggest an answer

Log in or Sign up to answer