API help committing work item updates
My company would like to have the activities of a CR auto-populate to High priority if High priority is chosen in the General tab. I figured it wasn't too hard, and I feel like I'm pretty close to getting it, but I'm definitely missing something.
Would someone mind taking a look at this code and see if they can determine why the commit of the new data doesn't take effect? Displaying the activity in the console at the end of the script shows that the activity has the priority set as I wanted, but the commit never displays in the activity, even after saving and reloading the form. No errors in the console after the commit either.
Apologies for the mix of jquery and JS, I'm learning little by little. The for loop in the first section starts at 1 because the first activity in our templates is just a formatting runbook. Also, I have tried setting the newData.Activity.Priority as an array before committing, and that didn't seem to get it either.