Bug 27003

Summary: action_logs table error when adding an item
Product: Koha Reporter: Andres Ovalle López <aovalle>
Component: DatabaseAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: andrewfh, aovalle, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, julian.maurice, magnus, nick, victor
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26470
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.01,20.05.08
Bug Depends on: 23463    
Bug Blocks:    
Attachments: Print screen actions_logs table
Bug 27003: Item creation log must be done after the item is created
Bug 27003: Item creation log must be done after the item is created
Bug 27003: Item creation log must be done after the item is created
Bug 27003: [20.05.x] Item creation log must be done after the item is created
Bug 27003: [20.05.x] Item creation log must be done after the item is created
Bug 27003: [20.05.x] Fix test failure

Description Andres Ovalle López 2020-11-12 01:34:38 UTC
Created attachment 113540 [details]
Print screen actions_logs table

When a user adds an instance, the information is saved in the action_logs table, however it is evident that in version 20.05 the object column remains empty. This is not the case in previous versions.
Comment 1 Jonathan Druart 2020-12-02 08:57:12 UTC
Created attachment 114086 [details] [review]
Bug 27003: Item creation log must be done after the item is created

Otherwise we don't have its itemnumber yet!

Test plan:
Add and modify an item and confirm that the action logs are created
correctly
Comment 2 Nick Clemens 2020-12-02 10:50:04 UTC
Created attachment 114093 [details] [review]
Bug 27003: Item creation log must be done after the item is created

Otherwise we don't have its itemnumber yet!

Test plan:
Add and modify an item and confirm that the action logs are created
correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens 2020-12-02 10:50:20 UTC
Small patch, passing QA
Comment 4 Jonathan Druart 2020-12-02 11:00:47 UTC
Thanks Nick!

I'd like a separate QA stamp, just in case. We are going to backport it and it touches a ->store method.
Comment 5 Julian Maurice 2020-12-04 13:16:58 UTC
Created attachment 114192 [details] [review]
Bug 27003: Item creation log must be done after the item is created

Otherwise we don't have its itemnumber yet!

Test plan:
Add and modify an item and confirm that the action logs are created
correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 6 Jonathan Druart 2020-12-04 16:04:56 UTC Comment hidden (obsolete)
Comment 7 Fridolin Somers 2020-12-07 08:06:33 UTC
Pushed to 20.11.x for 20.11.01
Comment 8 Jonathan Druart 2020-12-07 16:53:51 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 9 Andrew Fuerste-Henry 2020-12-15 20:30:45 UTC
Doesn't apply cleanly to 20.05, please rebase if needed
Comment 10 Magnus Enger 2021-01-19 14:13:56 UTC
(In reply to Andrew Fuerste-Henry from comment #9)
> Doesn't apply cleanly to 20.05, please rebase if needed

I am seeing this problem on a 20.05.06.000 installation, so a backport would be much appreciated.
Comment 11 Jonathan Druart 2021-01-19 15:11:23 UTC
(In reply to Andrew Fuerste-Henry from comment #9)
> Doesn't apply cleanly to 20.05, please rebase if needed

You will need bug 26470 first.
Comment 12 Jonathan Druart 2021-01-19 15:12:34 UTC
(In reply to Jonathan Druart from comment #11)
> (In reply to Andrew Fuerste-Henry from comment #9)
> > Doesn't apply cleanly to 20.05, please rebase if needed
> 
> You will need bug 26470 first.

And IMO that's too much conflicts in a critical area.
Comment 13 Magnus Enger 2021-01-20 12:15:45 UTC
(In reply to Jonathan Druart from comment #12)
> (In reply to Jonathan Druart from comment #11)
> > (In reply to Andrew Fuerste-Henry from comment #9)
> > > Doesn't apply cleanly to 20.05, please rebase if needed
> > 
> > You will need bug 26470 first.
> 
> And IMO that's too much conflicts in a critical area.

So, do we leave the problem unfixed, or could we write a separate patch just for the 20.05 branch?
Comment 14 Jonathan Druart 2021-01-20 15:03:04 UTC
Created attachment 115438 [details] [review]
Bug 27003: [20.05.x] Item creation log must be done after the item is created

Otherwise we don't have its itemnumber yet!

Test plan:
Add and modify an item and confirm that the action logs are created
correctly
Comment 15 Jonathan Druart 2021-01-20 15:03:18 UTC
Please try this patch on 20.05.x
Comment 16 Magnus Enger 2021-01-21 08:53:57 UTC
Created attachment 115512 [details] [review]
Bug 27003: [20.05.x] Item creation log must be done after the item is created

Otherwise we don't have its itemnumber yet!

Test plan:
Add and modify an item and confirm that the action logs are created
correctly

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch on a live server showing missing info in the logs.
Created and deleted an item. Verified the logs now have the same
info as in the olden days.
Comment 17 Magnus Enger 2021-01-21 08:55:18 UTC
PS. The live server was running 20.05.06.
Comment 18 Andrew Fuerste-Henry 2021-01-21 16:26:44 UTC
New patch pushed to 20.05.x for 20.05.08. thanks!
Comment 19 Nick Clemens 2021-01-22 20:17:06 UTC
Created attachment 115712 [details] [review]
Bug 27003: [20.05.x] Fix test failure
Comment 20 Victor Grousset/tuxayo 2021-01-22 20:18:54 UTC
Missing dependencies for 19.11.x, shouldn't be affected, no backport.
Comment 21 Andrew Fuerste-Henry 2021-01-22 20:36:38 UTC
Follow-up pushed to 20.05.x for 20.05.08