Forums

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

How to use set assigned to post function?

Sema YILDIRIM September 7, 2021

There is one defined "Script Field" named "Impact". It is filled automatically according to the fields selected by the user while creating the "Issue". For example Major, Minor.

 

 

I want to assign the role automatically if it is major or minor. Even though I put it at the bottom of the Postfunction, it doesn't assine because it doesn't see Impact value. What can I do?

1 answer

0 votes
Alex Koxaras -Relational-
Community Champion
September 8, 2021

Hi @Sema YILDIRIM ,

Is there an option to delay the execution of your post function? For example, JMWE has such an option. Since the custom script for the moderate field runs after your post function, then:

  • Either you should delay your post function or
  • Incorporate your PF into the moderate script, in order to run after moderate value has been set
Sema YILDIRIM September 8, 2021

Hi @Alex Koxaras -Relational- ,

 

thank you for the answer. Is it an application you call JMWE? There is no way I know of to delay it. I would be very happy if you share an example.

Alex Koxaras -Relational-
Community Champion
September 8, 2021

First of all see if the post function you've used has such an option. To delay its execution. Share a screenshot if you like.

Alex Koxaras -Relational-
Community Champion
September 8, 2021

You can also use a listener, which scriptrunner provides https://scriptrunner.adaptavist.com/latest/jira/tutorials/listeners-tutorial.html

So whenever the listeners sees a change in that custom field (impact) it will change the value accordingly!

Sema YILDIRIM September 8, 2021

above i sent you post function options and I send query detail

Alex Koxaras -Relational-
Community Champion
September 8, 2021

Try to add into your code a delay execution for about 1 to 2 seconds

https://community.boomi.com/s/article/howtodelayaprocessexecutionusinggroovy

This might do the trick.

Sema YILDIRIM September 8, 2021

unfortunately it didn't work

Alex Koxaras -Relational-
Community Champion
September 8, 2021

Then use an automation instead with the on value field changed trigger, or on issue create trigger.

Check for the impact value and put some if statements. This will work. :)

Suggest an answer

Log in or Sign up to answer