pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.95k stars 863 forks source link

Transition_Issue fail #1860

Open PoivronMax opened 4 months ago

PoivronMax commented 4 months ago

Bug summary

I now want to use the transition_issue function to change the status of JIRA, but since attachments must be added when the status changes, transition_issue cannot update attachments, so there is no way to change the JIRA status. I would like to ask how to change the jira status through transition_issue when the attachment is a required item.

Error: response text = {"errorMessages":[],"errors":{"attachment":"Field does not support update 'attachment'"}}

Is there an existing issue for this?

Jira Instance type

Jira Cloud (Hosted by Atlassian)

Jira instance version

No response

jira-python version

main

Python Interpreter version

3.8

Which operating systems have you used?

Reproduction steps

# 1. Given a Jira client instance
jira: JIRA
# 2. When I call the function with argument x
jira.the_function(x)
# 3.
...

Stack trace

response text = {"errorMessages":[],"errors":{"attachment":"Field does not support update 'attachment'"}}

Expected behaviour

JIRA Status Changed

Additional Context

No response

dimitarOnGithub commented 1 month ago

Just to confirm @PoivronMax , is your setup similar to https://community.atlassian.com/t5/Jira-questions/Attachment-requirement-validator/qaq-p/2607275?

I'm not sure the JIRA API itself actually allows uploading files during transition due to the different type of request. Perhaps a workaround would be to change the validation to check if an attachment is present for the issue and then transition, instead of requiring an attachment at the time of permission, somewhat related conversation over here - https://community.atlassian.com/t5/Jira-questions/Workflow-transition-dependent-on-attachment/qaq-p/1765403