Open cacack opened 3 months ago
I got this same problem. The reason is this library uses API version 2, to be able to use ADF it needs to be updated to version 3.
I found a way to update it when creating the Jira Client, however you must test if the v3 api is compatible with your code.
This is how I did it
class JiraClient():
def __init__(self, jira_url: str, jira_username: str, jira_token: str):
self.jira = JIRA(jira_url, basic_auth=(jira_username, jira_token))
# update API version
self.jira._options.update({"rest_api_version": 3})
after having that, you can test if the URL was updated with
client = JiraClient(jira_url=JIRA_URL,
jira_username=JIRA_USER,
jira_token=JIRA_TOKEN)
client.jira._get_url("issue")
Currently I only use create_issue and delete_issue, also update labels and add watches and that was compatible without changing anything in my code.
Bug summary
Per the documentation https://jira.readthedocs.io/examples.html#working-with-rich-text
However, passing in a dictionary for the
description
field on an issue throws a error indicating the description must be a string. The source does type this as a string https://github.com/pycontribs/jira/blob/main/jira/resources.py#L761, so I suspect the documentation is incorrect and ADF can't (currently) be used for descriptions. If so, then would like to raise this as a bug to have ADF correctly supported for descriptions.Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
No response
jira-python version
3.6.0
Python Interpreter version
3.11.4
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
The issue is created using the ADF specified for the description.
Additional Context
No response