Hi there. I set up a "Create Defect" button on my ticket screen.
I've been able to create a pop up screen with all fields I want copied over from the main ticket except for fix versions. I have no idea what I'm missing here...since I've been able to get the field on my screen as read only, it just doesn't copy from the original ticket.
What am I missing here?
Original ticket...linking with defects
Popup screen: no fix version carry over
Script in Behaviour:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.Version
def issueManager = ComponentAccessor.getIssueManager()
def version = ComponentAccessor.getVersionManager()
if (getBehaviourContextId() == "link-create-defect") {
getFieldById("project-field").setReadOnly(true)
getFieldById("issuetype-field").setReadOnly(true)
getFieldById("fixVersions-field").setReadOnly(true)
def contextIssue = issueManager.getIssueObject(getContextIssueId())
getFieldById("issuelinks-linktype").setFormValue("blocks validation of Baseline").setReadOnly(true)
getFieldById("issuelinks-issues").setFormValue(contextIssue.key).setReadOnly(true)
getFieldById("fixVersions").setFormValue(contextIssue.key).setReadOnly(true)
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.