A post function to add additional watchers fails

If we add additional watchers via a post function and the user has added a watcher the creation fails with the following error.

Error creating issue: Unable to update custom field customfield_10000 - Watchers in issue [new issue].

If the user leaves the watcher field blank then the issue creation is successful and the watchers are added.

We are using the append button and it still does not work. 

Any way around this?

2 answers

Maybe you should try to place your post function to the bottom of post functions list?

I have tried it putting it every where in the list. If the watchers field is left blank then it works fine but if the user adds a watcher the creation of the issue fails.

I found away around this by doing the following. It is a HACK but it works.

  1. Create another custom field. I called mine temp_watchers.
  2. Copy the value of watchers to temp_watchers
  3. Append the users you want to the temp_watchers field
  4. Clear the watchers field
  5. Copy the temp_watchers field to the watchers field
  6. clear the temp_watchers field.

Not pretty but it is working.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

85 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you