-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erroneous Warnings When Creating Issue Links #1875
Comments
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]>
I have the same issue. |
Same issue here. I even tried fetching the link types instead of using a string: def _create_issue_links(issue_key, issue):
created_issue = get_jira().issue(issue_key)
# Get link types from jira
link_types = get_jira().issue_link_types()
verification_link_type = next(link for link in link_types if link.name == "Verification")
for target in issue.link_verifies_keys:
get_jira().create_issue_link(
verification_link_type, inwardIssue=created_issue.key, outwardIssue=target
) But this still results in this warning log:
|
That's the code of the function create_issue_link:
Calling the function with a string as type we get the warning "Warning: Specified issue link type is not present in the list of link types" |
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: