Forums

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

Set assinge based on the field value

arno
Contributor
July 7, 2023

Hi all

  I want to automate some Settings in the process to automatically change agents when the value of the custom fields meets certain conditions. I try to set them using scriptrunner behaviours but I cannot find the manager field. Is there a better way to implement this scenario 

1 answer

1 vote
Kai Becker
Community Champion
July 7, 2023

Hi @arno 

thanks for your question. Using behaviours, you would usually prefill values on create screens or hide elements in drop down fields.

As of setting assignee according to another issue field, the easiest way would be to use components, as they have component leads, which could automatically be assigned to new issues.

If you want to assign issues during work on an issue, some more information is needed, to give you a valid option. Could you please describe your setup a little bit more and maybe post some screenshots?

arno
Contributor
July 7, 2023

Hi @Kai Becker 

 Thank you for your reply

What I expect is that when I do a state transition, based on the field "platform&Product Name", for example, when it is "ASR1803" (this field is a custom concatenated field), the manager will automatically assign to the specified user, how to write this statementfiled.png

Like # people like this
Kai Becker
Community Champion
July 7, 2023

Hi @arno 

thanks for clarification. Using Scriptrunner, I would recommend using Listeners
These can be configured to watch issue updates and modify issues afterwards.

There is also a script library to help you get started with scriptrunner.

Like # people like this
arno
Contributor
July 9, 2023

Hi @Kai Becker 

Thank you for your reply

According to your suggestion, I have tried, but I found that listeners can only judge and change the event of the issue, I can not find information similar to field changes, can you give me an example to tell me how to operate

Kai Becker
Community Champion
July 12, 2023

Hi @arno 

I'm not quite sure what you mean, but listeners do listen to specific events and can then modify the issue for example.

Screenshot 2023-07-12 at 09.02.43.png

It is possible to listen to all events or select a specific one. 
In the code field below, you need to use groovy to set the assignee.
There should be some examples in the library I linked above, to get you started. Hope this helps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events