how to get the value of CustomField Insight Object readOnly

Mehdi Bouazza March 20, 2023

Hello community

I create a custom field with a type Insight Object readOnly single and i want to get his value on behaviour (not initialiser) and put it into summary

here is my code

 

    def CF = getFieldByName('Template QSA Request').value
    summaryField.setFormValue(CF)
Summary ==> null
when i remove .value
     def CF = getFieldByName('Template QSA Request').value
    summaryField.setFormValue(CF)
Sammary ==> Form field ID: customfield_16930, value: null

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2023

Behaviours can only access values of fields that are on the screen (edit/create/transition).

I think by design, read-only insight fields are not displayed on screens other than the View screen.

So you'll need to use the customFieldManager to fetch the field value from the underlying issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events