Skip to content

api_v2: fix push_to_jira when using the PATCH method - #2801

Merged
Maffooch merged 1 commit into
DefectDojo:devfrom
xens:fix-api_v2-push_to_jira-on-patch
Aug 28, 2020
Merged

Maffooch merged 1 commit into
DefectDojo:devfrom
xens:fix-api_v2-push_to_jira-on-patch

Conversation

@xens

@xens xens commented Aug 25, 2020 •

Copy link
Copy Markdown
Contributor

This commit fixes an issue with Jira when using the PATCH method on the api_v2. It's now possible to send only {"push_to_jira": "True"} on a certain finding without repushing all the fields like we would do with a PUT or a POST.

I've tested the patch and it doesn't break the push_to_jira mechanism from the web-interface.

I'll also send a PR later to simplify the logic to avoid that kind of hack -> https://github.com/DefectDojo/django-DefectDojo/blob/master/dojo/api_v2/serializers.py#L482 (re-creating an a temporary object to enrich it....).

This commit fixes an issue with Jira when using the PATCH method on the api_v2.
It's now possible to send only `{"push_to_jira": "True"} on a certain finding
without repushing all the fields like we would do with a PUT or a POST.
@madchap
madchap self-requested a review August 25, 2020 15:55
@Maffooch
Maffooch merged commit d4c353c into DefectDojo:dev Aug 28, 2020
@xens
xens deleted the fix-api_v2-push_to_jira-on-patch branch August 28, 2020 06:34
9alexx3 pushed a commit to 9alexx3/django-DefectDojo that referenced this pull request Aug 12, 2026
This commit fixes an issue with Jira when using the PATCH method on the api_v2.
It's now possible to send only `{"push_to_jira": "True"} on a certain finding
without repushing all the fields like we would do with a PUT or a POST.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants