Error :Error 403: ForbiddenCRRRS8658E The server cannot validate the User attribute with the value. When trying to update attributes through a script
I am trying to update values of particular attributes using a script. Each time I run my script I get an error, " response: Object, status: 403, responseText: "Error 403: Forbidden Error 403: Forbidden CRRRS8658E The server cannot validate the User attribute with the value.
Requirements Management/5.0</i></p></body></html>", xhr: XMLHttpRequest, log: false, ioArgs: Object, correlationData: undefined } This is my code: var attributeValues = []; result.data.forEach(function (aa /* Artifact Attributes */){ for( var prop in aa.values){ aa.values['Verified Waiver Count'] = waiverCount; toSave.push(aa) }); RM.Data.setAttributes(toSave, function(result){ if(result.code !== RM.OperationResult.OPERATION_OK) { console.log("could not be saved"); } }); I can see that the waiverCount gets calculated through the web console. Each time I run it I get "could not be saved". I'm not sure if it's my code, or server, or permissions that causes the errors. |
Accepted answer
Hy Pooja,
If you read about the 403 state you'll see it means forbidden. This has mostly to do with the POST statement. So it could have to do something with the rights you'll execute the script. Do you use OAuth? Or, where do you define "waiverCount"? It could be, because your in {}-brackets, it'd loose it's context (check if "this", are the same inside and outside the brackets) does "toSave" loose it's context? (This seems to be the problem here) particularly you just send an empty toSave to the "setAttributes" function Unequal is written != and not !== (But it doesn't make a difference I guess) Does "RM.OperationResult.OPERATION_OK" have a value due to it's context? Because if it's undefined, it'll always compare to undefined Pooja Srivastava selected this answer as the correct answer
Comments
Pooja Srivastava
commented Mar 19 '15, 2:14 p.m.
Jonus,
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.