Bug 18251 - SCO alerts - need a trigger for successful checkouts
Summary: SCO alerts - need a trigger for successful checkouts
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 16732 18349 22378
Blocks: 22406
  Show dependency treegraph
 
Reported: 2017-03-13 14:30 UTC by Nick Clemens
Modified: 2019-05-30 12:17 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
This enhancement adds new triggers to ease defining custom sounds/alerts for the self checkout module
Version(s) released in:


Attachments
Bug 18251 - SCO alerts - need a trigger for successful checkouts (2.09 KB, patch)
2017-03-13 14:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18251 - SCO alerts - need a trigger for successful checkouts (2.30 KB, patch)
2017-03-17 11:31 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18251 (QA Followup) Add alert box to checkout message (979 bytes, patch)
2017-03-20 10:52 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18251 (QA Followup) Add alerts for all SCO actions (5.36 KB, patch)
2017-03-20 15:09 UTC, Nick Clemens
Details | Diff | Splinter Review
SCO renew button triggers a checkout (10.68 KB, image/png)
2017-03-20 20:08 UTC, Marc Véron
Details
Bug 18251 - (QA Followup) Add 'renew' operation and check renewal vs checkout (3.75 KB, patch)
2017-03-28 18:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18251 - SCO alerts - need a trigger for successful checkouts (2.38 KB, patch)
2017-03-29 21:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
BUg 18251 (QA Followup) Add alert box to checkout message (1.03 KB, patch)
2017-03-29 21:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18251 (QA Followup) Add alerts for all SCO actions (5.43 KB, patch)
2017-03-29 21:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18251 - (QA Followup) Add 'renew' operation and check renewal vs checkout (3.82 KB, patch)
2017-03-29 21:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18251 - SCO alerts - need a trigger for successful checkouts (2.49 KB, patch)
2017-08-18 17:18 UTC, Kyle M Hall
Details | Diff | Splinter Review
BUg 18251 (QA Followup) Add alert box to checkout message (1.03 KB, patch)
2017-08-18 17:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18251 (QA Followup) Add alerts for all SCO actions (5.41 KB, patch)
2017-08-18 17:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18251 - (QA Followup) Add 'renew' operation and check renewal vs checkout (3.91 KB, patch)
2017-08-18 17:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18251: (follow-up) fix rebase error (1.16 KB, patch)
2019-02-20 19:59 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18251: SCO alerts - need a trigger for successful checkouts (2.50 KB, patch)
2019-02-25 10:33 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (QA follow-up) Add alert box to checkout message (1.04 KB, patch)
2019-02-25 10:33 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (QA follow-up) Add alerts for all SCO actions (5.44 KB, patch)
2019-02-25 10:33 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout (3.96 KB, patch)
2019-02-25 10:33 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (follow-up) fix rebase error (1.16 KB, patch)
2019-02-25 10:33 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: SCO alerts - need a trigger for successful checkouts (2.55 KB, patch)
2019-02-25 13:44 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (QA follow-up) Add alert box to checkout message (1.09 KB, patch)
2019-02-25 13:44 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (QA follow-up) Add alerts for all SCO actions (5.50 KB, patch)
2019-02-25 13:44 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout (4.01 KB, patch)
2019-02-25 13:45 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18251: (follow-up) fix rebase error (1.22 KB, patch)
2019-02-25 13:45 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-03-13 14:30:36 UTC
Failed checkouts on the sco can be triggered by presence of alert, however, we have no feedback for a successful checkout.
Comment 1 Nick Clemens 2017-03-13 14:34:51 UTC
Created attachment 61040 [details] [review]
Bug 18251 - SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out
Comment 2 Marc Véron 2017-03-17 11:31:28 UTC
Created attachment 61211 [details] [review]
Bug 18251 - SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

Followed test plan, works as expected.
(Works with external sound only, see Bug 16732)
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Jonathan Druart 2017-03-17 13:42:49 UTC
Should not it be an id instead of a class?
Comment 4 Jonathan Druart 2017-03-17 13:45:33 UTC
And maybe the message should be in a box, to make it more visible. At the moment it is quite hidden.
Comment 5 Marc Véron 2017-03-17 13:56:00 UTC
(In reply to Jonathan Druart from comment #3)
> Should not it be an id instead of a class?

The alerts were introduced with Bug 11431, the triggers are in a class, e.g.

https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44395&action=diff#a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt_sec1

<div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
Comment 6 Nick Clemens 2017-03-20 10:52:08 UTC
Created attachment 61262 [details] [review]
Bug 18251 (QA Followup) Add alert box to checkout message
Comment 7 Jonathan Druart 2017-03-20 13:32:50 UTC
I understand that your patch fixes your need, but to me it's now inconsistent. We get a confirmation message for checkouts, but for checkins...
Do not you think we should get confirmation messages for all the sco possible actions?
Comment 8 Nick Clemens 2017-03-20 13:44:42 UTC
(In reply to Jonathan Druart from comment #7)
> Do not you think we should get confirmation messages for all the sco
> possible actions?

I do agree with this, we should give more feedback rather than less. Take this one as a start and open new bugs for other actions? Or would you prefer everything on one report?
Comment 9 Jonathan Druart 2017-03-20 13:50:09 UTC
I'd prefer to deal with everything here, the changes should not be big.
Comment 10 Nick Clemens 2017-03-20 15:09:38 UTC
Created attachment 61324 [details] [review]
Bug 18251 (QA Followup) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts
Comment 11 Jonathan Druart 2017-03-20 19:13:29 UTC
Nick, I never see the "renewed" message. I am wondering if there is not something broken somewhere.
Comment 12 Marc Véron 2017-03-20 20:08:47 UTC
Created attachment 61343 [details]
SCO renew button triggers a checkout

(In reply to Jonathan Druart from comment #11)
> Nick, I never see the "renewed" message. I am wondering if there is not
> something broken somewhere.

Looking at the form details for renewing I see 'checkout' in hidden field 'op', see screenshot attached. Would expect an op like 'renew'.
Comment 13 Nick Clemens 2017-03-28 18:22:31 UTC
Created attachment 61665 [details] [review]
Bug 18251 - (QA Followup)     Add 'renew' operation and check renewal vs checkout
Comment 14 Jonathan Druart 2017-03-29 16:10:32 UTC
In that case we could remove the confirmed param in the template, do you confirm?
I can followup on QAing.
Comment 15 Jonathan Druart 2017-03-29 21:03:09 UTC
Created attachment 61715 [details] [review]
Bug 18251 - SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

Followed test plan, works as expected.
(Works with external sound only, see Bug 16732)
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2017-03-29 21:03:13 UTC
Created attachment 61716 [details] [review]
BUg 18251 (QA Followup) Add alert box to checkout message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Jonathan Druart 2017-03-29 21:03:18 UTC
Created attachment 61717 [details] [review]
Bug 18251 (QA Followup) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 18 Jonathan Druart 2017-03-29 21:03:24 UTC
Created attachment 61718 [details] [review]
Bug 18251 - (QA Followup) Add 'renew' operation and check renewal vs checkout

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 19 Jonathan Druart 2017-03-29 21:05:17 UTC
(In reply to Jonathan Druart from comment #14)
> In that case we could remove the confirmed param in the template, do you
> confirm?
> I can followup on QAing.

Wrong, we need it to avoid the call to CanBookBeIssued.
Comment 20 Jonathan Druart 2017-03-29 21:19:55 UTC
Hold on, do not push please.
Comment 21 Jonathan Druart 2017-03-29 21:37:00 UTC
Will need to be rebased on top of bug 18349.
Comment 22 Kyle M Hall 2017-08-18 17:18:56 UTC
Created attachment 66186 [details] [review]
Bug 18251 - SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

Followed test plan, works as expected.
(Works with external sound only, see Bug 16732)
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 23 Kyle M Hall 2017-08-18 17:19:03 UTC
Created attachment 66187 [details] [review]
BUg 18251 (QA Followup) Add alert box to checkout message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 24 Kyle M Hall 2017-08-18 17:19:05 UTC
Created attachment 66188 [details] [review]
Bug 18251 (QA Followup) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 25 Kyle M Hall 2017-08-18 17:19:08 UTC
Created attachment 66189 [details] [review]
Bug 18251 - (QA Followup) Add 'renew' operation and check renewal vs checkout

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 26 Jonathan Druart 2017-08-25 13:41:08 UTC
One pair of eyes is missing here.
Comment 27 Katrin Fischer 2017-08-27 11:08:38 UTC
I tried testing this, but ran into some problems:

6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

I don't see the note in 9.

Also renewals for me don't work. I tried to check out an item and immediately renew it. Nothing happens when I click on "renew item" - so I can't test this part. It's the same with and without the patch. Can someone confirm this?
Comment 28 Katrin Fischer 2017-08-27 11:38:17 UTC
Filed bug 19187 - figured out it was OpacRenewalAllowed. 
Renewals are ok (sound and note), but no sound and note for successful checkouts.
Comment 29 Nick Clemens 2019-02-20 19:59:12 UTC
Created attachment 85409 [details] [review]
Bug 18251: (follow-up) fix rebase error
Comment 30 Josef Moravec 2019-02-25 10:33:12 UTC
Created attachment 85603 [details] [review]
Bug 18251: SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

Followed test plan, works as expected.
(Works with external sound only, see Bug 16732)
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 31 Josef Moravec 2019-02-25 10:33:16 UTC
Created attachment 85604 [details] [review]
Bug 18251: (QA follow-up) Add alert box to checkout message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 32 Josef Moravec 2019-02-25 10:33:19 UTC
Created attachment 85605 [details] [review]
Bug 18251: (QA follow-up) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 33 Josef Moravec 2019-02-25 10:33:23 UTC
Created attachment 85606 [details] [review]
Bug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 34 Josef Moravec 2019-02-25 10:33:27 UTC
Created attachment 85607 [details] [review]
Bug 18251: (follow-up) fix rebase error
Comment 35 Josef Moravec 2019-02-25 10:35:12 UTC
I rebased the patchset as there were some minor conflicts. The patchset works as described, but I think it should be adapted to play internal sounds too.
Comment 36 Nick Clemens 2019-02-25 11:28:08 UTC
(In reply to Josef Moravec from comment #35)
> I rebased the patchset as there were some minor conflicts. The patchset
> works as described, but I think it should be adapted to play internal sounds
> too.

I don't disagree with this, but I would consider it a separate issue. 

We will need to decide how we want to handle these. Copy all files to the opac directories? Build the full path to the intranet versions? Move the sounds to a new share directory? As there is some decision to be made I think we can do it on a new bug
Comment 37 Josef Moravec 2019-02-25 13:36:06 UTC
(In reply to Nick Clemens from comment #36)
> (In reply to Josef Moravec from comment #35)
> > I rebased the patchset as there were some minor conflicts. The patchset
> > works as described, but I think it should be adapted to play internal sounds
> > too.
> 
> I don't disagree with this, but I would consider it a separate issue. 
> 
> We will need to decide how we want to handle these. Copy all files to the
> opac directories? Build the full path to the intranet versions? Move the
> sounds to a new share directory? As there is some decision to be made I
> think we can do it on a new bug

I created new report, see bug 22406.

As you pointed out, there are some decisions needed and we don't block this patchset with it. So I am returning this to the queue.
Comment 38 Josef Moravec 2019-02-25 13:44:51 UTC
Created attachment 85616 [details] [review]
Bug 18251: SCO alerts - need a trigger for successful checkouts

This patch adds simple text and a div to allow for sounds to be
configured upon successful SCO checkout

To test:
1 - Enable sco module
2 - Enable AudioAlerts
3 - Define alert with
     Selector: .sco-alert-success
     Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg
4 - Checkout to patron using SCO
5 - Note only feedback is a addition of item to checkouts list
6 - Apply patch
7 - Checkout ot patron via SCO
8 - You should hear the sound specified above
9 - You should also see a note: Item checked out

Followed test plan, works as expected.
(Works with external sound only, see Bug 16732)
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 39 Josef Moravec 2019-02-25 13:44:55 UTC
Created attachment 85617 [details] [review]
Bug 18251: (QA follow-up) Add alert box to checkout message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 40 Josef Moravec 2019-02-25 13:44:59 UTC
Created attachment 85618 [details] [review]
Bug 18251: (QA follow-up) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 41 Josef Moravec 2019-02-25 13:45:03 UTC
Created attachment 85619 [details] [review]
Bug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 42 Josef Moravec 2019-02-25 13:45:07 UTC
Created attachment 85620 [details] [review]
Bug 18251: (follow-up) fix rebase error

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 43 Nick Clemens 2019-02-26 14:39:47 UTC
Awesome work all!

Pushed to master for 19.05
Comment 44 Martin Renvoize 2019-03-01 11:14:59 UTC
Enhancement won't be backported to 18.11.x series.