Forums

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

Dynamic description on portal for attachment field

Brian Michelsen August 13, 2019

Hi,

 

How can I dynamically change the description for the "field" attachment, in a Scriptrunner behaviour?

I hoped something like this:

def formField = getFieldById("attachment")
formField.setRequired(true)
formField.setDescription ("Please attach a document")

I have also tried getFieldByName("Attachment"), but does not work.

1 answer

0 votes
PD 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.
August 13, 2019

Your script works for me.

2019-08-13 10_57_52-Create Issue - JIRA Test - Corporate Issue Tracker - https___projects-test.qad.c.png

Where did you put this script?

Are you seeing any errors in the jira logs? 

Did you make sure you have the correct mapping on the behaviour config?

Brian Michelsen August 14, 2019

Thank you for responding.

 

I forgot to write that it's in the customer portal. In the backend it works correct.

 

Backend:

Skærmbillede 2019-08-14 kl. 13.38.08.png

Portal:

Skærmbillede 2019-08-14 kl. 13.39.43.png

PD 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.
August 14, 2019

Ha... sorry, I missed seeing the portal tag.

I don't have any experience using behaviours with the SD portal.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events