You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 instancejira: 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 warningWarning: Specifiedissuelinktypeisnotpresentinthelistoflinktypes
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
The text was updated successfully, but these errors were encountered:
Equality check between IssueLinkType and string always returns false.
Function decorator casts IssueLinkType parameters to string, so a
warning is always logged. This fixes that issue.
Closes: pycontribs#1875
Signed-off-by: Shymon Samsel <[email protected]>
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 appropriateIssueLinkType
, this warning still occurs as thetranslate_resource_args
decorator converts it to a string. This can be fixed by changing the lineissue_link_types = self.issue_link_types()
toissue_link_types = list(map(lambda x: x.name, self.issue_link_types()))
in theJIRA.create_issue_link
method inclient.py
Is there an existing issue for this?
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?
Reproduction steps
Stack trace
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
The text was updated successfully, but these errors were encountered: