-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
JIRA.create_issue_link crash when passing IssueLinkType #1604
Comments
I was able to reproduce this issue. The same behavior is seen if you retrieve the issue link type using issue_link_type(id), as well. |
Sorry for the delay, I did not manage to find time, yet. I hope I will be able to work on it within the next two weeks and also catch some other related oversights in the process. Jannik Meinecke (jannik.meinecke@mercedes-benz.com) on behalf of MBition GmbH. |
fixes pycontribs#1604 The program was tested solely for our own use cases, which might differ from yours. ___ Jannik Meinecke <jannik.meinecke@mercedes-benz.com> on behalf of MBition GmbH. https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md Licensed under [BSD-2-Clause license](https://github.com/pycontribs/jira/blob/main/LICENSE)</sub>
@dmcbride64 can you elaborate on this? I am unable to reproduce your issue. Jannik Meinecke (jannik.meinecke@mercedes-benz.com) on behalf of MBition GmbH. |
ReproduceGet a list of valid link types: link_types = jira.issue_link_types()
print(link_types)
Pick any valid link type 'id' from the list and use it to create an issue link: link_type = jira.issue_link_type(10000)
jira.create_issue_link(link_type, "SANDBOX-255", "SANDBOX-257")
|
Fixes #1604 ___ Jannik Meinecke <jannik.meinecke@mercedes-benz.com> on behalf of MBition GmbH. https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md Licensed under [BSD-2-Clause license](https://github.com/pycontribs/jira/blob/main/LICENSE)</sub>
@dmcbride64 I see, thanks for the clarification. Jannik Meinecke (jannik.meinecke@mercedes-benz.com) on behalf of MBition GmbH. |
Yes, I believe that's true. Just a slight wrinkle on the original issue. Only mentioned for completeness. |
Bug summary
According to the type annotations of JIRA.create_issue_link the method accepts the type-argument either as a string or as an
IssueLinkType
object.If you pass an instance of
IssueLinkType
it will not be translated and thus cause a Serialization-Exception when trying to post.I can submit a PR with the solution mentioned below and new tests next week, probably.
Jannik Meinecke (jannik.meinecke@mercedes-benz.com) on behalf of MBition GmbH.
Provider Information
Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
No response
jira-python version
3.4.0
Python Interpreter version
3.9
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
Fitting to the current way to handle automated convertion; IssueLinkType should probably be parsed into its name by
translate_resource_args
.Might be sensible to check for other cases of this, too.
Additional Context
No response
The text was updated successfully, but these errors were encountered: