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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

173 views 0 4
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