Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set Organization in scriptrunner behaviour

Nessrine Hafi September 6, 2022

Hello Support,

 

I'm trying to display in my form a specific organization and to be readonly, therefore i used scriptrunner behaviour. Except i wasn't capable to change the organization using set Form value. Therefore i wanted to check if anyone i familiar with this problem please

have a nice day, 

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

Hi @Nessrine Hafi

In your description, you mentioned:-

I'm trying to display in my form a specific organization and to be readonly, therefore i used scriptrunner behaviour.

Could you please clarify what field type you use to display your organizations? Is it a List?

Or are you referring to the Add Organization field, i.e. as shown below:-

image1.png

If it is the latter, the Behaviour is not usable.

Also, could you please share the code you use to configure your Behaviour along with a screenshot of your Behaviour configuration?

 

Thank you and Kind regards,

Ram

Nessrine Hafi September 7, 2022

Hello @Ram Kumar Aravindakshan _Adaptavist_

 

I'm sorry if my explanation seems lacking. what i'm trying to do is to set a default organization in the form when creating an issue.

Here's what i get when opening the create screen:

ex1.PNG

And here's what i want to have to be set by default. 

ex2.PNG

 

What i tried to do was just to set the fields value using setfieldvalue i will leave what i tried: 

getFieldById("customfield_ID").setFormValue(<Organization ID>)
Also:
getFieldById("customfield_ID").setFormValue("<Organization name>")
But i think it's the wrong syntax. 
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2022

Hi @Nessrine Hafi

Thank you for providing the clarification.

Unfortunately, at present, ScriptRunner's Behaviour is unable to set the value for the Organization field.

If you feel it would be good to include this feature, I suggest you visit our support portal and create an Improvement/New Feature request for this. It will be added to our backlog, where it will be considered for development. 

The alternative would be to use a Listener, using the Issue Created event or Issue Updated event, which will set the value once the Issue is created or updated. You could refer to this Community Post for some sample code using the Listener.

Thank you and Kind regards,

Ram

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events