Action/Trigger fails to set complete_time on grouped events

Bug #1672824 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.11
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.12 / All versions

To verify:

1. Log in to the self-check interface with a patron account that has items checked out or on hold.

2. Navigate to the circulations or holds lists and click the 'Print List' button.

3. After the print job is queued (i.e. completed in Evergreen -- putting ink to paper is not required), locate the action_trigger.event rows in the database for the print operation.

Something like this should do it on a default setup (and non-busy server).

select id, event_def, add_time, complete_time, state from action_trigger.event where event_def in (11, 12) order by add_time desc limit 10;

4. Confirm that "state" is "complete" and "complete_time" is NULL.

Patch en route.

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Fix pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1672824-at-complete-time

To confirm, follow the steps above, and check the complete_time is set on the events once the 'complete' state is reached.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.12-rc
no longer affects: evergreen/2.10
Galen Charlton (gmc)
Changed in evergreen:
milestone: 2.12-rc → 2.12.1
Revision history for this message
Chris Sharp (chrissharp123) wrote :

I can confirm the problem on our 2.11 instance. In our case the "hold ready" notice events all lack a complete_time, which I discovered when creating a reports template filtering on that field (fell back to last_update_time, iirc).

Changed in evergreen:
milestone: 2.12.1 → 2.12.2
Revision history for this message
Galen Charlton (gmc) wrote :

Is it worth adding an update script that tries to clean this up? If so, given the potentially large number of rows to update, should the update be spun off into a separate wishlist for 3.0?

Revision history for this message
Bill Erickson (berick) wrote :

Something along the lines of this?

update action_trigger.event set complete_time = update_time where state = 'complete' and complete_time is null;

Agreed it would be good to have and should be a separate script.

Revision history for this message
Galen Charlton (gmc) wrote : Re: [Bug 1672824] Re: Action/Trigger fails to set complete_time on grouped events

> update action_trigger.event set complete_time = update_time where state
> = 'complete' and complete_time is null;

Exactly

Revision history for this message
Bill Erickson (berick) wrote :

Opened bug #1690418 for the back-fill update.

Galen Charlton (gmc)
Changed in evergreen:
status: New → Confirmed
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Tested and pushed to master, rel_2_12, and rel_2_11. Thanks, Bill!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Galen Charlton (gmc) → nobody
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.