You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I'm using script runner behavior version 6.2.1 to populate value on my jira service desk customer portal screen.
Below is the code that I use to set the multi-user picker custom field:
def appManagerField = getFieldByName("Application Manager(s)")
appManagerField.setFormValue(['user1']);
This piece of code is triggered because, when I print the log, I can see the value in the log file.
However, the custom field is not populated with the value that I want (user1 in this case).
Anyone could give advise on this please?
When I use behavior, I usually face an issue when getting field by name. It sometime doesnt work, so to verify, I usually trigger
getFieldByName("Application Manager(s)").setHelpText("Hello")
If the word hello appear, that means you reference the correct form field
--
Recently I had a similar requirement and I achieved it with the exact type that you are providing.
You may also try one of these because sometimes one of them only work
appManagerField.setFormValue(['user1']);
//or
appManagerField.setValue(['user1']);
Hi Najjar,
Thank you for your reply!
The below code is working fine. So, getting the field is not the issue for us.
getFieldByName("Application Manager(s)").setHelpText("Hello")
However, setting the field value seems to be remain problem. Both code below are not working. I really don't know why.
appManagerField.setFormValue(['user1']);
//or
appManagerField.setValue(['user1']);
Somebody help pls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this
appManagerField.setValue('user1')
If you want to add multiple:
appManagerField.setValue('user1,user2, user3')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Najjar,
I've try what you suggesterd. If i use method 'setValue', I will hit compilation error 'Cannot find matching method....'
I now suspect that this problem is caused by some other plugin that I use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I meant to write
appManagerField.setFromValue('user1,user2, user3')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, I've tried appManagerField.setFromValue('user1,user2, user3') as well. Still not working.
Here is the error I see from the browser console log
Previously, my code was working fine. Until, recently, my colleague did Jira version upgrade. So, I suspect it might due to some other plugin that cause this error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This only happen to user picker field.
For text field, I can set the value successfully using behavior.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.