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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,671
Community Members
 
Community Events
184
Community Groups

Using the Scriptrunner Post Function to Configure the Mapper Based on a customField

Edited

Quiero asignar automáticamente un usuario específico (usando su nombre de usuario) según los campos personalizados

Por lo tanto, configuré el siguiente script usando la función de publicación Scriptrunner.

 

image.png

 

The users are well assigned based on the custom field, but when I execute the transition of the flow the assigned one is not updated.

Did I do something wrong with my script?

Thank you in advance for your help

1 answer

1 accepted

0 votes
Answer accepted
Gustavo Félix
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.
Sep 30, 2020

Hi @reynaldo 
In what order are you adding your postfunction ? 

In your workflow postfunction , you should have
1.  Creates the issue originally
2.  Re-index
3.  Fire a Issue Created event...


This is the order:

image.png

Gustavo Félix
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.
Oct 01, 2020

It seems that your code is ok. I would add 
log.warn issue.getCustomFieldValue(areaCustomField)

and at the end

log.warn issue.getAssignee() to see if it gets assigned correctly

After your workflow executes, check the logs in "No failures in the last 10 executions" to see what gets logged.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events