{
"errorMessages": [
"We couldn't save your changes. Copy your content, then try reloading the page."
],
"errors": {}
}
I get the above error trying to edit issue via Cloud Rest API (PUT operation)
url = "/rest/api/3/issue/{issueIdOrKey}"
Please help
from inputer import a, b, c
import requestsfrom requests.auth
import HTTPBasicAuth
import json
auth = HTTPBasicAuth(b,c)
counter = 0
headers = { "Accept": "application/json", "Content-Type": "application/json"}
f=open("doors-test.json", "r")
if f.mode == 'r': fields =f.read()
field = json.loads(fields)
print (len(field["Key"]))
for i in range(len(field["Key"])):
val = str(i) key = (field["Key"])
number = (len(field["Fix versions"][val]))
url = "%s/rest/api/3/issue/%s" %(a, key[val]) print (url) # quit()
payload = json.dumps( { "fields":
{ "components": [ { "add": field["Components"][val] } ],
"customfield_10400": { "value": str(field["Acceptance Criteria"][val])},
"customfield_13876": {"value" : field["Sub-process"][val]} } })
response = requests.request(
"PUT",
url,
data=payload,
headers=headers,
auth=auth
)
counter += 1
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
print(counter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.