https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39756

--- Comment #25 from ChloĆ© Zermatten <[email protected]> ---
(In reply to Andrew Fuerste-Henry from comment #22)
> (In reply to ChloƩ Zermatten from comment #16)
> > Created attachment 208187 [details] [review] [review]
> > Bug 39756: feat: enact actions
> >
> > Actions run after notices are queued, so a letter on a trigger
> > that also acts describes the loan as it stood before the action:
> > the fine still outstanding, the item not yet lost.
> 
> Ideally lost item charges and processing fees would be applied *before* the
> notice is generated, so that the notice can include details of those fees. 
> 
> In my testing I was inconsistently able to get replacement costs and
> processing fees to show in a notice, but I've been unable to recreate that.
> In retrospect, I suspect the instances where I *did* get that data in the
> notice must have been cases where I ran the script more than once for a
> given checkout.

That makes sense. I'd actually originally written this as a 'process the action
queue first, and the notice queue second'.

Off the top of my head - and I'll go do some further digging tomorrow, I think
the trade-off, and the reason behind the swap, is that if you tick mark
returned, then populating a notice becomes difficult, as the data it wants
isn't where we expect it to be anymore: for one, the issues row would be
archived and deleted. 

Hence the swap to draining the notice queue, preparing the notices and
enqueuing those messages before moving on to action enactment.


What might make sense is this:

    $action_executor->process_action_queue;
    $action_executor->process_notice_queue;
    $action_executor->process_return_queue;

Assuming of course that the only use case where 'notice after action' is
problematic is the one where mark_returned ran. It is the only one I can think
of at the minute.

I'll go ahead and submit that change tomorrow so it can be tried out.

Happy to revert it if it turns out I was wrong! Equally happy to look into
processing all actions first if we want to test that - it is a two line change.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to