django-DefectDojo icon indicating copy to clipboard operation
django-DefectDojo copied to clipboard

Notes are not added to new JIRAs

Open coheigea opened this issue 3 years ago • 1 comments

When pushing a new finding to JIRA, where the product has "Push notes" selected for the JIRA configuration, existing notes will not be pushed to the JIRA. Only notes that are created after the JIRA is created are pushed to JIRA.

Steps to reproduce:

  1. Enable "Push notes" in the JIRA configuration for a product.
  2. For a given finding add a note and then push to JIRA. Observe that no comment exists in JIRA for the note.
  3. Add a note to the finding and refresh the JIRA, and the second note is added as a comment, but the first note is missing.

It looks like for add_jira_issue in https://github.com/DefectDojo/django-DefectDojo/blob/c101e47b294863877cd68a82d0cc60f8017b45b1/dojo/jira_link/helper.py#L599 it never checks for existing notes to push as comments, like in the add_comment function.

If you agree this makes sense to add I'll look at a PR for it.

coheigea avatar Jun 20 '22 11:06 coheigea

PR submitted: https://github.com/DefectDojo/django-DefectDojo/pull/6449

coheigea avatar Jun 22 '22 07:06 coheigea