Description
Bug summary
When creating issue links, I get a warning log informing me that the issue link type I specify is not present in the list of link types, even if it is in fact present. This is due to the equality of the IssueLinkType
class and strings not working. Even when passing in the type argument as the appropriate IssueLinkType
, this warning still occurs as the translate_resource_args
decorator converts it to a string. This can be fixed by changing the line issue_link_types = self.issue_link_types()
to issue_link_types = list(map(lambda x: x.name, self.issue_link_types()))
in the JIRA.create_issue_link
method in client.py
Is there an existing issue for this?
- I have searched the existing issues
Jira Instance type
Jira Server or Data Center (Self-hosted)
Jira instance version
No response
jira-python version
main
Python Interpreter version
3.10.12
Which operating systems have you used?
- Linux
- macOS
- Windows
Reproduction steps
# 1. Given a Jira client instance
jira: JIRA
# 2. When I create an "is closely related to" issue link:
jira.create_issue_link("Closely Related To", "KEY-1", "KEY-2")
# 3. I get the erroneous warning
Warning: Specified issue link type is not present in the list of link types
Stack trace
n/a
Expected behaviour
I expect no warning, as the issue link is created correctly, and is in fact in the set of issue links returned by jira.issue_link_types()
Additional Context
No response