Creating an issue via the REST API v3 with description as empty string (like below) used to work until recently:
{'fields': {'project': {'id': xxx}, 'assignee': None, 'description': {'content': [{'content': [{'text': '', 'type': 'text'}], 'type': 'paragraph'}], 'version': 1, 'type': 'doc'}, 'issuetype': {'name': 'Story'}, 'labels': ['test1'], 'summary': 'Ticket'}}
Now returns: 400 - "We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields."
Just setting the description allows the request to succeed:
{'fields': {'project': {'id': xxx}, 'assignee': None, 'description': {'content': [{'content': [{'text': 'SOMETHING HERE', 'type': 'text'}], 'type': 'paragraph'}], 'version': 1, 'type': 'doc'}, 'issuetype': {'name': 'Story'}, 'labels': ['test1'], 'summary': 'Ticket'}}
Is there somewhere breaking changes like this are posted and kept track of for us developers that are at the mercy of these changes?
Do you still get the error if you don't specify anything for the description, as in:
{'fields': {'project': {'id': xxx}, 'assignee': None, 'type': 'paragraph'}], 'version': 1, 'type': 'doc'}, 'issuetype': {'name': 'Story'}, 'labels': ['test1'], 'summary': 'Ticket'}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, now try setting the description directly, without setting the other values, like content and type etc, as in:
{'fields': {'project': {'id': xxx}, 'assignee': None, 'description': '', 'issuetype': {'name': 'Story'}, 'labels': ['test1'], 'summary': 'Ticket'}}
This is the method I use, but that's for Jira Server, not cloud.
This issue might be related to the use of the description field now being in ADF format, so they might have added a sanity check that, if you define a description in the new format, it must have some content, not nothing.
If that turns out to be the case, you'd have to alter your code to check if the description was empty first, then only add its definition to the request body if it's not nothing.
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.