Bug 9732 - timestamp not updated when modifying biblio
Summary: timestamp not updated when modifying biblio
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-28 15:23 UTC by Fridolin Somers
Modified: 2014-12-07 20:02 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed patch (1.42 KB, patch)
2013-02-28 15:26 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2013-02-28 15:23:43 UTC
When modifying a biblio, biblio.timestamp and biblioitems.timestamp are not updated.
Isn't it the main purpose of those fields ?
Comment 1 Fridolin Somers 2013-02-28 15:26:51 UTC
Created attachment 15774 [details] [review]
Proposed patch

See commit comment
Comment 2 Chris Cormack 2013-03-01 09:59:41 UTC
This shouldn't be needed

Can you check your database structure, it should be
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

Which means MySQL will update it, can you do show create table biblio;

select biblionumber,title,timestamp from biblio;
+--------------+---------+---------------------+
| biblionumber | title   | timestamp           |
+--------------+---------+---------------------+
|            1 | chris   | 2012-07-01 16:21:13 |
|            2 | chris 2 | 2012-06-11 23:14:39 |
+--------------+---------+---------------------+

 update biblio set title='test timestamp' where biblionumber=1;
Query OK, 1 row affected (0.05 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select biblionumber,title,timestamp from biblio;
+--------------+----------------+---------------------+
| biblionumber | title          | timestamp           |
+--------------+----------------+---------------------+
|            1 | test timestamp | 2013-03-01 22:59:09 |
|            2 | chris 2        | 2012-06-11 23:14:39 |
+--------------+----------------+---------------------+
2 rows in set (0.00 sec)
Comment 3 Fridolin Somers 2013-03-01 12:59:08 UTC
Your right Chris,
I did not knew this behavior.
On a biblio edition : biblioitems.timestamp is always updated (because marcxml and marc are updated), but biblio.timestamp is updated only if a concerned column is updated (title, author, ...).

Closed.