Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,680
Community Members
 
Community Events
168
Community Groups

Set Organization in scriptrunner behaviour

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

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

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. 

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

Atlassian Community Events