--- Comment #12 from M. Tompsett <mtomp...@hotmail.com> ---
(In reply to Katrin Fischer from comment #11)
> Hi Mark, if you think it's the wrong way to do it, please explain.
"I think building a hash ref in SendQueuedMessages and using the built hashref
on the _get_unsent_messages call would be better than introducing this, and
this fails to handle how to send messages."
> It makes no sense to write tests when the idea of the patch
> needs to be changed later on.
In this case, the tests could have been easily tweaked and pushed into
t/db_dependent/Letter.t, but I understand why you say that.
> I was thinking the routine might be better not so single purpose.
-- which is why I suggested re-working SendQueuedMessages just a little.
> I think there might be other use cases like the patron
> registration verification emails (I even think there is
> a bug about those already) that we will want to send immediately.
True, which is what this tweak suggesting would aid in setting up for.
> Maybe just needs the letter code as parameter and a
> more general name?
No, because I was thinking...
> Could there be a scenario where we have a race condition? Entry not yet
> written to message_queue and trying to send it or similar?
Of this. This is why I said borrowernumber too. You aren't likely to have
the same borrower trying to send the same letter, except mid-upgrade when
the borrower has gone all "reset, it's not here, reset, it's not here, reset,
it's not here" and generated multiple resets. So the whole $pw-> doesn't
work. Another reason to use SendQueuedMessages.
"After all, calling it with a borrower number and a letter code in the params
hash ref should be easy enough to add, and then you could simply tweak the
t/db_dependent/Letters.t test to test for the password reset case."
You'll notice I quoted what I said in comment #9, because I thought I was clear
enough. Sorry that I wasn't.
You are receiving this mail because:
You are watching all bug changes.
Koha-bugs mailing list
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/