Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dojo/api_v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,9 @@ def notes(self, request, pk=None):
note_type=note_type,
)
note.save()
finding.last_reviewed = note.date
finding.last_reviewed_by = author
finding.save(update_fields=["last_reviewed", "last_reviewed_by", "updated"])
finding.notes.add(note)
# Determine if we need to send any notifications for user mentioned
process_tag_notifications(
Expand Down
6 changes: 4 additions & 2 deletions dojo/jira_link/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,11 @@ def check_for_and_create_comment(parsed_json):
finding.notes.add(new_note)
finding.jira_issue.jira_change = timezone.now()
finding.jira_issue.save()
# Only update the timestamp, not other fields like 'active' to avoid
finding.last_reviewed = new_note.date
finding.last_reviewed_by = author
# Only update the timestamp fields, not other fields like 'active' to avoid
# race conditions with concurrent webhook events (e.g. issue_updated)
finding.save(update_fields=["updated"])
finding.save(update_fields=["last_reviewed", "last_reviewed_by", "updated"])
return None


Expand Down