The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

Vitek Urban
Contributor
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Roman Shvetsov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2018

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

TAGS
AUG Leaders

Atlassian Community Events