Bug 13796 - Alert in OPAC when renewing an item with a rental charge
Summary: Alert in OPAC when renewing an item with a rental charge
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-05 14:02 UTC by Fiona Borthwick
Modified: 2018-06-04 20:18 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13796: OPAC: Display rental charge for renewing (3.07 KB, patch)
2016-06-21 18:09 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.07 KB, patch)
2016-07-03 13:03 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.11 KB, patch)
2016-07-03 13:10 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.19 KB, patch)
2016-07-18 17:06 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 13796: (followup) Change wording to variant III (2.30 KB, patch)
2016-08-07 19:24 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.07 KB, patch)
2016-08-09 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13796: (followup) Change wording to variant III (2.37 KB, patch)
2016-08-09 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.42 KB, patch)
2017-04-21 15:55 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13796: OPAC: Display rental charge for renewing (3.48 KB, patch)
2017-08-01 14:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.54 KB, patch)
2017-09-20 21:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13796: (follow-up) Move renewal remaining statement back (2.29 KB, patch)
2017-09-20 21:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13796: OPAC: Display rental charge for renewing (3.58 KB, patch)
2017-10-27 14:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13796: (follow-up) Move renewal remaining statement back (2.33 KB, patch)
2017-10-27 14:58 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fiona Borthwick 2015-03-05 14:02:51 UTC
Could a patron see an alert when renewing their items via My Account on the OPAC if the item has a rental fee associated with it?

This would be very useful as then the patron could decide whether or not they wish to go ahead with the renewal.

So for example, they have borrowed a DVD and already paid £2.50 at the time of checking the item out.  If they renew this DVD then they are automatically charged another £2.50 but currently there is no alert at the point of renewing in the opac to tell them this.
Comment 1 Marc Véron 2016-03-30 12:39:07 UTC
As well valid for current master?
Comment 2 Marc Véron 2016-06-21 18:09:43 UTC Comment hidden (obsolete)
Comment 3 Sally 2016-06-22 14:48:16 UTC
Hi Marc,

This is great, and definitely works - but on the sandbox I used, [% ISSUE.description %] didn't call anything back, which led to this rather confusing description on the renewal screen:

Renew Fee for 5.00 (4 of 5 renewals remaining)

Could:

<span class="renewalfee">Fee for [% ISSUE.description %] [% ISSUE.renewalfee | $Price %]</span>

be altered slightly to say something like:

<span class="renewalfee">NOTE:  A charge of [% ISSUE.renewalfee | $Price %] will be added.</span>

which would generate:

Renew NOTE:  A charge of 5.00 will be added.

I'm not sure what others think?
Comment 4 Marc Véron 2016-06-22 18:44:58 UTC
Hi Sally,

Thank you for testing and your comments.

I tested again with a item type BK "Books" with a charge of 5.01, checked out an item of this type to a patron, and I get the following in OPAC (Renew is a link in blue):

 Renew Fee for Books 5.01 (10 of 10 renewals remaining)

Hmm, why does it work here and not in your system? - What do you have as item type?

Regarding the text changes:

I think it makes sense to say something about the item type, since the charge can be different for each item type.

So maybe something like:
NOTE: A charge of 5.00 for Books will be added.
Comment 5 Sally 2016-06-27 15:22:49 UTC
Hi Marc,

The language revision of:  NOTE: A charge of 5.00 for Books will be added - sounds good.   

I've just tested again using the sandbox at:  http://sandbox1.ptfs-europe.co.uk/ with the MARC21 database.

I'm using a DVD with an item type of "DVD Film" and a collection code of "Film media" - but it returns 'fee for Books', rather than 'fee for DVD Film' as I would expect:  

Black snake moan [dvd] 	02/07/2016	39999000016611		 Renew Fee for Books 1.00 (5 of 5 renewals remaining)

I'm not sure what's causing the discrepancy; when you test with an item other than a book, does it return the correct item type?

Thanks for your work on this - it'd be great to get this into Koha.
Comment 6 Marc Véron 2016-07-03 13:03:18 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2016-07-03 13:08:20 UTC
(In reply to Sally Healey from comment #5)
> Hi Marc,
> 
> The language revision of:  NOTE: A charge of 5.00 for Books will be added -
> sounds good.   
> 
> I've just tested again using the sandbox at: 
> http://sandbox1.ptfs-europe.co.uk/ with the MARC21 database.
> 
> I'm using a DVD with an item type of "DVD Film" and a collection code of
> "Film media" - but it returns 'fee for Books', rather than 'fee for DVD
> Film' as I would expect:  
> 
> Black snake moan [dvd] 	02/07/2016	39999000016611		 Renew Fee for Books 1.00
> (5 of 5 renewals remaining)
> 
> I'm not sure what's causing the discrepancy; when you test with an item
> other than a book, does it return the correct item type?
> 
> Thanks for your work on this - it'd be great to get this into Koha.

Hi Sally, thanks for testing.
I did some changes. Can you please test again?

On my site, Item types like Books, Hardware, Music appear as expected:

Renew Fee for Books 5.01 (8 of 10 renewals remaining)
Renew Fee for Hardware 1.25 (9 of 10 renewals remaining)
Renew Fee for Music 5.00 (10 of 10 renewals remaining)
Comment 8 Marc Véron 2016-07-03 13:10:31 UTC Comment hidden (obsolete)
Comment 9 PTFS Europe Sandboxes 2016-07-18 17:06:08 UTC
Patch tested with a sandbox, by Sally Healey <sally.healey@cheshiresharedservices.gov.uk>
Comment 10 PTFS Europe Sandboxes 2016-07-18 17:06:28 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2016-07-25 18:13:48 UTC
I don't think we have found the best formatting for the fee sentence.
It shows:
  Renew Fee for VHS 5.00 (2 of 3 renewals remaining)
I think it's a bit confusing.

Owen, any ideas?
Comment 12 Katrin Fischer 2016-07-25 22:05:52 UTC
Hm, also keep an eye on capitalisation please!
Comment 13 Marc Véron 2016-07-26 06:40:13 UTC
Thinking about wording.

Prerequisites: 
Readability. As short as possible (we are in a table column). Translation friendly (no sentence splitting). Rules for capitalization (normally, item type name is capitalized).

Word 'Renew' is a link (blue), rest is text (black).


Without renewal fee (as is)
---------------------------

Renew (10 of 10 renewals remaining)

With renewal fee:
-----------------

Variant I (as proposed by patch):

Renew Fee for Books 5.00 (2 of 3 renewals remaining)
Renew Fee for VHS 5.00 (2 of 3 renewals remaining))

Variant II:

Renew. Fee for item type 'Books': 5.55. (10 of 10 renewals remaining)
Renew. Fee for item type 'VHS': 5.55. (10 of 10 renewals remaining)

Variant III:

Renew (10 of 10 renewals remaining) Fee for item type 'Books': 3.75
Renew (10 of 10 renewals remaining) Fee for item type 'VHS': 3.75


Variant IV:

Renew (10 of 10 renewals remaining) Fee (item type 'Books'): 3.75
Renew (10 of 10 renewals remaining) Fee (item type 'VHS'): 3.75

Variant V:

Renew (10 of 10 renewals remaining) A fee of 4.25 will be added for item type 'Books'

Renew (10 of 10 renewals remaining) A fee of 4.25 will be added for item type 'VHS'

Variant VI:

Renew (10 of 10 renewals remaining) NOTE: A fee of 4.25 will be added for item type 'Books'

Renew (10 of 10 renewals remaining) NOTE: A fee of 4.25 will be added for item type 'VHS'

Other propositions?
Comment 14 Owen Leonard 2016-08-02 12:32:47 UTC
I think Variant III is the best.
Comment 15 Katrin Fischer 2016-08-07 13:06:12 UTC
Variant III by native speaker ;)

Marc, can you please adapt and resubmit? 
I have checked the patch itself - it works as described.
Comment 16 Marc Véron 2016-08-07 19:24:24 UTC Comment hidden (obsolete)
Comment 17 Marc Véron 2016-08-07 19:27:05 UTC
I hope it's OK to switch back to 'Signed off'
Comment 18 Jonathan Druart 2016-08-09 09:37:24 UTC
Created attachment 54188 [details] [review]
Bug 13796: OPAC: Display rental charge for renewing

This patch displays the rental fee that will be applied for
renewing (near "Renew" link on patron's summary page)

To test:
- Apply patch
- Verify that you have item types with and without rental fee
  for testing
- Issue items with an without rental fee to a patron
- In OPAC, display patron's summary page
- Verify in table 'Checked out', items with rental charge display an information as
  appropriate (near the link 'Renew')

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 19 Jonathan Druart 2016-08-09 09:37:28 UTC
Created attachment 54189 [details] [review]
Bug 13796: (followup) Change wording to variant III

See comments #13 - 15

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 20 Marc Véron 2017-04-21 15:55:51 UTC
Created attachment 62535 [details] [review]
Bug 13796: OPAC: Display rental charge for renewing

This patch displays the rental fee that will be applied for
renewing (near "Renew" link on patron's summary page)

To test:
- Apply patch
- Enable system preference 'OpacRenewalAllowed'
- Verify that you have item types with and without rental fee
  for testing
- Issue items with an without rental fee to a patron
- In OPAC, display patron's summary page
- Verify in table 'Checked out', items with rental charge display an information as
  appropriate (near the link 'Renew')

Patch rewritten because of merge issues with previous patches. 2017-04-21 mv
Comment 21 Marc Véron 2017-04-21 15:58:45 UTC
Patch rewritten because of problems with applying, needs a new sign-off.
Comment 22 Marc Véron 2017-06-20 15:16:37 UTC Comment hidden (obsolete)
Comment 23 Marc Véron 2017-07-20 08:08:30 UTC
Still applies on current master
Comment 24 Owen Leonard 2017-08-01 14:00:55 UTC
Created attachment 65397 [details] [review]
[SIGNED-OFF] Bug 13796: OPAC: Display rental charge for renewing

This patch displays the rental fee that will be applied for
renewing (near "Renew" link on patron's summary page)

To test:
- Apply patch
- Enable system preference 'OpacRenewalAllowed'
- Verify that you have item types with and without rental fee
  for testing
- Issue items with an without rental fee to a patron
- In OPAC, display patron's summary page
- Verify in table 'Checked out', items with rental charge display an information as
  appropriate (near the link 'Renew')

Patch rewritten because of merge issues with previous patches. 2017-04-21 mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 25 Kyle M Hall 2017-09-01 17:43:47 UTC
Minor issue, the renewals remaining have been moved into the conditional so they will only show if the patron can renew the item themselves. Can be solved easily with an ELSE on canrenew.
Comment 26 Marc Véron 2017-09-01 18:29:07 UTC
(In reply to Kyle M Hall from comment #25)
> Minor issue, the renewals remaining have been moved into the conditional so
> they will only show if the patron can renew the item themselves. Can be
> solved easily with an ELSE on canrenew.

Sorry, I have no time ATM. Can you provide a counter patch?
Comment 27 Katrin Fischer 2017-09-20 21:45:06 UTC
Created attachment 67272 [details] [review]
Bug 13796: OPAC: Display rental charge for renewing

This patch displays the rental fee that will be applied for
renewing (near "Renew" link on patron's summary page)

To test:
- Apply patch
- Enable system preference 'OpacRenewalAllowed'
- Verify that you have item types with and without rental fee
  for testing
- Issue items with an without rental fee to a patron
- In OPAC, display patron's summary page
- Verify in table 'Checked out', items with rental charge display an information as
  appropriate (near the link 'Renew')

Patch rewritten because of merge issues with previous patches. 2017-04-21 mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 28 Katrin Fischer 2017-09-20 21:45:10 UTC
Created attachment 67273 [details] [review]
Bug 13796: (follow-up) Move renewal remaining statement back

This moved the renewals remaining statement back out of the
condition so it's visible always - with and without a rental
fine on the item type.
Comment 29 Katrin Fischer 2017-09-20 21:46:15 UTC
I've moved the statement back out of the condition as per Kyle's suggestion.
Comment 30 Marc Véron 2017-09-21 07:18:56 UTC
(In reply to Katrin Fischer from comment #29)
> I've moved the statement back out of the condition as per Kyle's suggestion.

Hi Katrin, thanks for fixing it. 
Marc
Comment 31 Kyle M Hall 2017-10-27 14:58:36 UTC
Created attachment 68742 [details] [review]
Bug 13796: OPAC: Display rental charge for renewing

This patch displays the rental fee that will be applied for
renewing (near "Renew" link on patron's summary page)

To test:
- Apply patch
- Enable system preference 'OpacRenewalAllowed'
- Verify that you have item types with and without rental fee
  for testing
- Issue items with an without rental fee to a patron
- In OPAC, display patron's summary page
- Verify in table 'Checked out', items with rental charge display an information as
  appropriate (near the link 'Renew')

Patch rewritten because of merge issues with previous patches. 2017-04-21 mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 32 Kyle M Hall 2017-10-27 14:58:43 UTC
Created attachment 68743 [details] [review]
Bug 13796: (follow-up) Move renewal remaining statement back

This moved the renewals remaining statement back out of the
condition so it's visible always - with and without a rental
fine on the item type.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 33 Jonathan Druart 2017-10-27 19:10:15 UTC
Pushed to master for 17.11, thanks to everybody involved!