No Audit Table for acq.lineitem_detail

Bug #1965797 reported by Jennifer Pringle
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Evergreen 3.8

There are currently no audit tables for acq.lineitem_detail so if a copy on a line item is changed or deleted there is no way to track the changes or confirm the existence of the deleted copy.

This has caused issues for us a few times as we're unable to track back what actually happened when troubleshooting.

tags: added: acq database
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Jason Stephenson (jstephenson) wrote :

You can add the auditor yourself using the acq.create_acq_auditor database function. The following would create an audit table on acq.lineitem_detail:

select acq.create_acq_auditor('acq', 'lineitem_detail');

If you think it should be created by default in new schemas, that's a valid bug request. I'm not sure that we should add it via an upgrade script.

Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

Thanks Jason! We've added it.

I think it should be created by default in new schemas. Not having it has been an issue for us for years.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Here's a branch that adds the acq.lineitem_detail auditor to the base schema for new installations:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1965797-audit-acq-lineitem_detail

The table (acq.acq_lineitem_detail_history) is not added via database upgrade. The release notes explain how to adde the table and its indexes if so desired. Consequently, there are not tests for the existence of the table and its indexes. It is considered optional.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.next
Changed in evergreen:
assignee: nobody → Josh Stompro (u-launchpad-stompro-org)
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Signoff branch at user/stompro/lp1965797-audit-acq-lineitem_detail-signoff

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp1965797-audit-acq-lineitem_detail-signoff

Applied the SQL to DB and the new acq.acq_lineitem_detail_history table looks good. Made some changes in acq.linetiem_detail and the history showed up in acq.acq_lineitem_detail_history.

Looks good to me.
Josh

tags: added: signedoff
Changed in evergreen:
assignee: Josh Stompro (u-launchpad-stompro-org) → nobody
Changed in evergreen:
importance: Undecided → Wishlist
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed for inclusion in 3.11. Thanks, Jason and Josh!

Changed in evergreen:
status: Confirmed → Fix Committed
milestone: 3.next → 3.11-beta
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.