I have a requirement to hide the comment field in the Edit screen. I was able to hide it using the following Behaviours script:
def commentField = getFieldById(getFieldChanged())
if (getFieldScreen().name == "My Edit Screen" && !getActionName())
{ // check if on edit screen
commentField.setHidden(true)
}
But, the problem is that it is also hiding the comment field in the View screen, which I do not want.
For example, after I open/dismiss the Edit screen and clicked on the "Comment" button in the "Comments" tab in the View screen, the "Comment" button disappeared. Also clicking on the "Comment" button under the Summary in the View screen has no affect.
If I refresh the browser, the "Comment" button appears again in the "Comments" tab, and clicking on it will display the comment field.
Anyone knows how to hide the comment field in the Edit screen without affecting the comment field in the View screen?
Is that custom field configured for all issue types and global projects?
If it is configured for only specific issues types or specific projects, then your filter can only contain those specific issue types and/or projects. Unfortunately, the field won't display, and just have null values, if not all issues are configured for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.