You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub Ticket: Fix Report Stuck in Submitted State and Update Code Logic
Context:
This issue is related to helpdesk ticket #4652. A user reported that their report is stuck in the "submitted" state and does not display the "accepted" badge.
For reference, after a successful submission, a report should transition from auditee_certified to submitted while the dissemination process is ongoing. Once the dissemination completes successfully, the report should then transition from submitted to disseminated. However, in the case associated with ticket #4652, the final transition from submitted to disseminated never occurred.
Issue:
Upon investigation, it was unclear whether this issue was caused by human error (the user possibly clicked "submit" multiple times while the first submission was still processing) or a system issue (potential race conditions during the state transition and associated database operations).
Regardless of the root cause, it is evident that the dissemination part of the process did not execute as expected. This led the submission process into the else block of an if statement, where there was no logic to handle this specific scenario, resulting in the report being stuck in the "submitted" state.
Proposed Fixes:
Update the Code:
Modify the else block to properly handle the case where dissemination fails, ensuring that the process can continue without getting stuck. Add proper logic and error handling (beyond just pass), including logging for better traceability.
Add a Django Command or Admin Process:
Provide a Django command or admin process to allow administrators to transition reports that are stuck in the "submitted" state.
The process should follow sac waiver approach and:
Perform full validation of the report.
If validation is successful, trigger the dissemination and transition the report from submitted to disseminated.
If validation fails, transition the report back to auditee_certified so the user can address any issues and resubmit.
This fix will prevent future reports from being trapped in this state and ensure smooth transitions between report states.
The text was updated successfully, but these errors were encountered:
GitHub Ticket: Fix Report Stuck in Submitted State and Update Code Logic
Context:
This issue is related to helpdesk ticket #4652. A user reported that their report is stuck in the "submitted" state and does not display the "accepted" badge.
For reference, after a successful submission, a report should transition from
auditee_certified
tosubmitted
while the dissemination process is ongoing. Once the dissemination completes successfully, the report should then transition fromsubmitted
todisseminated
. However, in the case associated with ticket #4652, the final transition fromsubmitted
todisseminated
never occurred.Issue:
Upon investigation, it was unclear whether this issue was caused by human error (the user possibly clicked "submit" multiple times while the first submission was still processing) or a system issue (potential race conditions during the state transition and associated database operations).
Regardless of the root cause, it is evident that the dissemination part of the process did not execute as expected. This led the submission process into the else block of an
if
statement, where there was no logic to handle this specific scenario, resulting in the report being stuck in the "submitted" state.Proposed Fixes:
Update the Code:
pass
), including logging for better traceability.Add a Django Command or Admin Process:
submitted
todisseminated
.auditee_certified
so the user can address any issues and resubmit.This fix will prevent future reports from being trapped in this state and ensure smooth transitions between report states.
The text was updated successfully, but these errors were encountered: