bcgov / cas-registration

A web app for Registration in OBPS under the Clean Growth branch
Apache License 2.0
1 stars 1 forks source link

Enhance Audit Trail Implementation (DB session) [6] #451

Open Sepehr-Sobhani opened 11 months ago

Sepehr-Sobhani commented 11 months ago

Description of the Tech Debt

The current audit trail implementation is not very efficient and the audit fields need to be created, updated, and archived manually. However, there are ways to enhance this feature to make it more robust, which we can consider at a later time, perhaps after the MVP.

Some useful links and suggestions have been provided, including:

We could also override all of Django's built-in functions (.add, .set, .update, .create, .save, .delete, .get_or_create, .update_or_create, .clear) to set those values at the beginning of the function and then run the rest of the code based on Django's implementation. However, we need to thoroughly test this approach before implementing it. Could be something like:

def save(*args, **kwargs):
    #implementing the logic here
    super().save(*args, **kwargs)

Risk Value Scoring:

Level Value
High 3
Medium 2
Low 1
Technical Debt - Risk Types Level Value
Business Area Risk - Risk of business area visibility / damage to user experience 1
Developer Fault Risk - How likely will this tech debt cause a future error related to coding on top of it 1
System Fault Risk - Risk of system errors or application downtime 1
Time Scale Risk - Compound risk effect if left alone. How much more difficult to fix or dangerous will this become over time? 1
Time Sink Risk - How much will this tech debt slow the development process down 2
TOTAL SCORE: 6

Notes

Blocked by #387

Sepehr-Sobhani commented 10 months ago

This could be a post-MVP enhancement/tech debt.