Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Post Function

hello everyone

I have trouble with post function,

have added "Set field value" and then wanted to auto add watchers (three of them)

after creating issue it is adding only one randomly not all of them

any ideas what i am doing wrong

watchers.jpg

2 answers

1 accepted

0 votes
Answer accepted

Hi,

to add the value to the Watchers field, you just need to check the "Add value(s) to the field" option, which you have done.

However, your problem comes from the fact that, on Jira Cloud, post-functions run asynchronously, and therefore simultaneously. And because of the lack of transactional integrity in Jira Cloud, the three post-functions end up overwriting what the other post-functions are doing at the same time.

But in your case, since you're adding three users with the same conditional execution, you don't need three post-functions. Just use one post-function and provide all three accountIds separated by a comma, as shown in the "Expected value" help tab.

it works thanks a lot

1 vote

The post-functions you are using are not adding watchers, they are setting the watcher each time.  Assuming they run sequentially, the second one will replace the value set in the first one, and then the the third one will again repace the value set in the second one.

what to do my dear?

Change to a post function that adds instead of sets the watcher.

Hi,

there is no add watcher in JMWE. Can you help us to build-our-own (scripted) Post-function (JMWE app)? I don't know how to write nunjucks script

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you