Behaviours - Getting field ID "project" from a form returns null

Vitek Urban January 11, 2018

Hi,

I am just solving an issue with Behaviours - I have a configured behaviour with appropriate mapping and everything goes well :)

But when I try to read field Project, this field returns null in all cases (both on create issue form and other (edit etc.) issue form). Using of "underlyingIssue" is not a solution for me.

My script seems like this:

def projectFormField = getFieldById("project") as FormField

def project = projectFormField.getValue() as String // String or whatever... ;)


log.debug("Project: " + project) // returns: Project: null

log.debug("Project: " + projectFormField) // returns: Project: Form field ID: project, value: null

 Anybody knows? Thank you.

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Roman Shvetsov July 9, 2018

if (issueContext.projectObject.key == "nameproject") { ... }

TAGS
AUG Leaders

Atlassian Community Events