Closed (fixed)
Project:
Book Copy
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2009 at 18:21 UTC
Updated:
20 Oct 2009 at 22:30 UTC
Jump to comment: Most recent file
The book_copy_history table has a uid column but uid is never stored.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | book_copy-435812.patch | 2.18 KB | evoltech |
| #1 | book_copy_db_delete.patch | 1.26 KB | kleinmp |
Comments
Comment #1
kleinmp commentedHere's a patch that stores the uid information. It also adds a nodeapi hook that removes items from the book_copy_history when the nodes are deleted.
Comment #2
jgraham commentedI'll review the uid portion of the patch when I get a chance, but removing the history will not get committed;
Consider the following scenario;
Book A is copied to Book B
Book B is copied to Book C
Book C is copied to Book D
Book B is deleted
If we remove the referencing records from book_copy_history we have no way of telling that both Book C and Book D were at least partially derived from A. We had a use case where this information was requested. Showing the history tree we will see a "hole" where Book B was deleted, but the information is tracked so we know that Book A was the original source material for Book C and eventually Book D.
Comment #3
evoltech commentedThere are a couple of issue with this patch.
1) It does not apply cleanly.
2) There is no uid in the {book_copy_history} table. Is it hoped that this column gets added?
3) It is unclear what exactly the compromise proposed by @jgraham is. Should it be assumed that you would like to add the tracking of uid, but not deleting of book_copy_history?
Comment #4
jgraham commentedThe intent was to add the uid field to the table and the corresponding portion from the patch provided by kleinmp.
However the nodeapi portions of the patch are not to be commited as per the scenario described in my previous post.
Comment #5
evoltech commentedThis patch makes the appropriate changes to book_copy.install to add the new uid field and handle upgrades for existing installations. It also includes the logic from @kleinmp's patch without the delete logic. This patch was made against book_copy-HEAD, it can be applied with:
cd book_copy-HEAD
patch -p0 < book_copy-435812.patch
Comment #6
jgraham commentedcommitted thanks kleinmp and evoltech