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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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