A post function to add additional watchers fails

Scott Correll March 22, 2016

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

0 votes
Scott Correll April 6, 2016

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.

0 votes
Aleks Yenin (Polontech)
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.
March 22, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events