Bug 26680 - Update (rcvd) to (received) with its own class in basket view
Summary: Update (rcvd) to (received) with its own class in basket view
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2020-10-14 19:44 UTC by Barbara Johnson
Modified: 2022-06-06 20:25 UTC (History)
3 users (show)

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


Attachments
Title in basket with (rcvd) displayed in red (33.26 KB, image/png)
2020-10-14 19:44 UTC, Barbara Johnson
Details
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received (2.28 KB, patch)
2020-10-17 12:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received (2.42 KB, patch)
2020-10-20 16:43 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received (2.49 KB, patch)
2020-10-20 21:03 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received (2.55 KB, patch)
2020-10-21 15:14 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Johnson 2020-10-14 19:44:34 UTC
Created attachment 111638 [details]
Title in basket with (rcvd) displayed in red

When viewing a basket of titles on basket.pl it would helpful to highlight the (rcvd) info for ease of use and efficiency.  We currently use some jQuery (created for us by George Williams at NEKLS) to make ours red so that it stands out.  But I think it would great if this could be incorporated into Koha.  

Example:
(rcvd) All the devils are here / by Penny, Louise.

jQuery we're using:

$("#acqui_basket_content p:contains('(rcvd)')").html(function(_, html) {
      return html.replace(/(rcvd)/g, '<span style="font-weight: bold; color: #990000;">$1</span>');
});
Comment 1 Katrin Fischer 2020-10-15 23:38:59 UTC
Would it already help to wrap the received in a span with a class for easier styling?
Comment 2 David Cook 2020-10-16 00:35:16 UTC
Maybe it's also time to change "rcvd" to "received" (for English clarity and ease of translation for non-English users)?
Comment 3 Barbara Johnson 2020-10-16 13:49:31 UTC
I think wrapping in a span for easier styling would be great.  Good suggestion to change the wording to "received" which is more clear and improving ease of translation is a bonus too.
Comment 4 Katrin Fischer 2020-10-17 12:17:06 UTC
Created attachment 111943 [details] [review]
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received

The new span with the class order-received will allow to have
individual styling on the term to make it stand out more in the
list of order lines of a basket. The text change will ease translation.

To test:
- In acquisitions:
- Create a new basket
- Add at least 2 order lines
- Close the basket
- Receive a new shipment and one of your order lines
- Go back to your basket
- One line should now show "(rcvd)"
- Apply patch
- Reload the basket page
- Verify the text has changed and element now has a class in the
  HTML source
Comment 5 Barbara Johnson 2020-10-18 18:32:01 UTC
In the 5th step, when I click on Receive I'm getting the error - "Template process failed: undef error - The method Koha::Item->size is not covered by tests!" which is followed by lots of details about the error.
Comment 6 Katrin Fischer 2020-10-18 18:43:12 UTC
(In reply to Barbara Johnson from comment #5)
> In the 5th step, when I click on Receive I'm getting the error - "Template
> process failed: undef error - The method Koha::Item->size is not covered by
> tests!" which is followed by lots of details about the error.

Hi Barbara, I wonder if this is related to the patch as I haven't touched the receive process, only the basket summary page. If you can, could you repeat the tests with out the patch?

Did you create items on order?
Comment 7 Katrin Fischer 2020-10-18 19:42:40 UTC
Receiving items is broken for me too - independent of this patch :( I filed bug 26730.
Comment 8 Séverine Queune 2020-10-20 16:43:24 UTC
Created attachment 112054 [details] [review]
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received

The new span with the class order-received will allow to have
individual styling on the term to make it stand out more in the
list of order lines of a basket. The text change will ease translation.

To test:
- In acquisitions:
- Create a new basket
- Add at least 2 order lines
- Close the basket
- Receive a new shipment and one of your order lines
- Go back to your basket
- One line should now show "(rcvd)"
- Apply patch
- Reload the basket page
- Verify the text has changed and element now has a class in the
  HTML source

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 9 ByWater Sandboxes 2020-10-20 21:03:01 UTC
Created attachment 112076 [details] [review]
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received

The new span with the class order-received will allow to have
individual styling on the term to make it stand out more in the
list of order lines of a basket. The text change will ease translation.

To test:
- In acquisitions:
- Create a new basket
- Add at least 2 order lines
- Close the basket
- Receive a new shipment and one of your order lines
- Go back to your basket
- One line should now show "(rcvd)"
- Apply patch
- Reload the basket page
- Verify the text has changed and element now has a class in the
  HTML source

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 10 Martin Renvoize 2020-10-21 15:14:49 UTC
Created attachment 112105 [details] [review]
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received

The new span with the class order-received will allow to have
individual styling on the term to make it stand out more in the
list of order lines of a basket. The text change will ease translation.

To test:
- In acquisitions:
- Create a new basket
- Add at least 2 order lines
- Close the basket
- Receive a new shipment and one of your order lines
- Go back to your basket
- One line should now show "(rcvd)"
- Apply patch
- Reload the basket page
- Verify the text has changed and element now has a class in the
  HTML source

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2020-10-21 15:15:15 UTC
Nice little enhancement, works well.. Passing QA
Comment 12 Jonathan Druart 2020-11-04 12:04:03 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 13 Lucas Gass 2020-11-16 21:20:01 UTC
enhancement will not be backported to 20.05.x