Forums

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

How do I do a listener update custom field for a specific user with Scriptrunner

valeria cruz
Contributor
September 15, 2021

Hello guys!

I need to do a script listener for updated a custom field only for a specific user by rest API.


For UI, I'm using a scripted behavior to do this action.

I don't know if a listener is the best way to do this. I'm new on this topic.

1 answer

0 votes
Nic Brough -Adaptavist-
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.
September 15, 2021

Ok, you've named three different ways you might change a field here, and I am not sure I understand what you are trying to achieve.

Could you explain what you are trying to achieve from the end-user's point of view?  Something like "When someone moves an issue from one status to another, I want to have a field set to 'red' if Dave did it, or 'green' if someone else did it"  or, "when an issue is edited, if custom field X is set to one of three values, set custom field B to something else"

valeria cruz
Contributor
September 17, 2021

Hi Nic, thanks for your help

 

My actual necessity is (Only user "rocket" can update the "Complexity points" custom field).
I did a scripted behavior to block this custom field in my IU. However, this behavior didn't stop the update custom field using the rest API by other users.

In this case, I saw a necessity to do a script to "stop" the other user's update.
I didn't know if crate a script listeners it's the best option for my case =/

Suggest an answer

Log in or Sign up to answer