Skip to content

Commit b43cbdd

Browse files
authored
Merge branch 'bugfix' into fix-finding-counts-subquery-ordering
2 parents 6f830ef + 9e651dc commit b43cbdd

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

dojo/api_v2/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,9 @@ def notes(self, request, pk=None):
11241124
note_type=note_type,
11251125
)
11261126
note.save()
1127+
finding.last_reviewed = note.date
1128+
finding.last_reviewed_by = author
1129+
finding.save(update_fields=["last_reviewed", "last_reviewed_by", "updated"])
11271130
finding.notes.add(note)
11281131
# Determine if we need to send any notifications for user mentioned
11291132
process_tag_notifications(

dojo/jira_link/views.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,11 @@ def check_for_and_create_comment(parsed_json):
285285
finding.notes.add(new_note)
286286
finding.jira_issue.jira_change = timezone.now()
287287
finding.jira_issue.save()
288-
# Only update the timestamp, not other fields like 'active' to avoid
288+
finding.last_reviewed = new_note.date
289+
finding.last_reviewed_by = author
290+
# Only update the timestamp fields, not other fields like 'active' to avoid
289291
# race conditions with concurrent webhook events (e.g. issue_updated)
290-
finding.save(update_fields=["updated"])
292+
finding.save(update_fields=["last_reviewed", "last_reviewed_by", "updated"])
291293
return None
292294

293295

@@ -345,11 +347,11 @@ def post(self, request):
345347
# Get the open and close keys
346348
msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually"
347349
try:
350+
open_key = close_key = None
348351
issue_id = jform.cleaned_data.get("issue_key")
349352
key_url = jira_server.strip("/") + "/rest/api/latest/issue/" + issue_id + "/transitions?expand=transitions.fields"
350353
response = jira._session.get(key_url).json()
351354
logger.debug("Retrieved JIRA issue successfully")
352-
open_key = close_key = None
353355
for node in response["transitions"]:
354356
if node["to"]["statusCategory"]["name"] == "To Do":
355357
open_key = open_key or int(node["id"])

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ django-slack==5.19.0
1919
django-watson==1.6.3
2020
django-permissions-policy==4.28.0
2121
django-prometheus==2.4.1
22-
Django==5.2.9
22+
Django==5.2.11
2323
django-single-session==0.2.0
2424
djangorestframework==3.16.1
2525
html2text==2025.4.15

0 commit comments

Comments
 (0)