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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

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.
Sep 07, 2022 • edited Sep 08, 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

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.
Sep 08, 2022 • edited

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