Bug 34820 - Improve inventory tool message for items with non-matching notforloan values
Summary: Improve inventory tool message for items with non-matching notforloan values
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-18 16:01 UTC by Kyle M Hall
Modified: 2023-11-28 13:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the inventory tool to clarify the message for items with non-matching not for loan values in the inventory results 'Problems' column. It: - Adds a hint on the inventory tool page under 'Optional filters for inventory list or comparing barcodes' section. - Clarifies the message in the 'Problems' column: from 'Unknown not-for-loan status' to 'Items has no not for loan status'. If one or more not for loan values (Optional filters for inventory list or comparing barcodes > items.notforloan) are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message was "Unknown not-for-loan status". This could be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This is now clarified and the error message is now "Items has no not for loan status".
Version(s) released in:
23.11.00


Attachments
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value (2.49 KB, patch)
2023-09-18 16:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value (2.54 KB, patch)
2023-09-18 16:15 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value (2.53 KB, patch)
2023-09-18 16:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value (2.58 KB, patch)
2023-09-19 00:30 UTC, David Nind
Details | Diff | Splinter Review
Bug 34820: (QA follow-up) add filter, update CSV output (2.49 KB, patch)
2023-09-20 10:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 34820: (QA follow-up) Replace em tags with quotes (1.97 KB, patch)
2023-09-20 17:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value (2.63 KB, patch)
2023-10-03 12:35 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34820: (QA follow-up) add filter, update CSV output (2.54 KB, patch)
2023-10-03 12:35 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34820: (QA follow-up) Replace em tags with quotes (2.02 KB, patch)
2023-10-03 12:35 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34820: (QA follow-up) Fix span tag (1.21 KB, patch)
2023-10-03 12:35 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2023-09-18 16:01:49 UTC
In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.
Comment 1 Kyle M Hall 2023-09-18 16:08:41 UTC
Created attachment 155838 [details] [review]
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value

In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.

Test plan:
1) Create two items, one of which has the NFL status of "Ordered", the
   other having no NFL status
2) Enter those two barcodes in the inventory tool barcodes list
3) Check only "Ordered" in items.notforloan
4) Note the problem messages
5) Apply this patch
6) Re-run the inventory tool
7) Note the new clarified messages!
Comment 2 Kyle M Hall 2023-09-18 16:15:02 UTC
Created attachment 155848 [details] [review]
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value

In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.

Test plan:
1) Create two items, one of which has the NFL status of "Ordered", the
   other having no NFL status
2) Enter those two barcodes in the inventory tool barcodes list
3) Check only "Ordered" in items.notforloan
4) Note the problem messages
5) Apply this patch
6) Re-run the inventory tool
7) Note the new clarified messages!
Comment 3 Kyle M Hall 2023-09-18 16:16:08 UTC
Created attachment 155849 [details] [review]
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value

In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.

Test plan:
1) Create two items, one of which has the NFL status of "Ordered", the
   other having no NFL status
2) Enter those two barcodes in the inventory tool barcodes list
3) Check only "Ordered" in items.notforloan
4) Note the problem messages
5) Apply this patch
6) Re-run the inventory tool
7) Note the new clarified messages!
Comment 4 David Nind 2023-09-19 00:30:47 UTC
Created attachment 155871 [details] [review]
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value

In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.

Test plan:
1) Create two items, one of which has the NFL status of "Ordered", the
   other having no NFL status
2) Enter those two barcodes in the inventory tool barcodes list
3) Check only "Ordered" in items.notforloan
4) Note the problem messages
5) Apply this patch
6) Re-run the inventory tool
7) Note the new clarified messages!

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2023-09-19 19:11:55 UTC
These will translate really badly:

+                        <span>Item has unselected <em>Not for loan</em> status <em>[% result.notforloan %]</em></span><br/>
+                    [% ELSE %]
+                        <span>Items has no <em>not for loan</em> status</span><br/>

Can we do a bit better here maybe?

Also fails QA test tools:

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
   FAIL	  filters
		missing_filter at line 316 (                        <span>Item has unselected <em>Not for loan</em> status <em>[% result.notforloan %]</em></span><br/>)
   FAIL	  spelling
		 critera ==> criteria
Comment 6 Katrin Fischer 2023-09-19 19:13:26 UTC
Note: do we need a fix to the code for exporting to CSV as well?
Comment 7 Kyle M Hall 2023-09-20 10:45:26 UTC
Created attachment 155928 [details] [review]
Bug 34820: (QA follow-up) add filter, update CSV output
Comment 8 Kyle M Hall 2023-09-20 10:47:26 UTC
(In reply to Katrin Fischer from comment #5)
> These will translate really badly:

Katrin, any suggestions for improvements to the wording?
Comment 9 Katrin Fischer 2023-09-20 17:35:53 UTC
It's not the wording, it's the formatting. I'd forgo the <em> for quotes.
Comment 10 Kyle M Hall 2023-09-20 17:44:08 UTC
Created attachment 155957 [details] [review]
Bug 34820: (QA follow-up) Replace em tags with quotes
Comment 11 Kyle M Hall 2023-09-28 17:48:13 UTC
(In reply to Katrin Fischer from comment #9)
> It's not the wording, it's the formatting. I'd forgo the <em> for quotes.

Katrin, can you have another look as this now that I've replaced them em tags?
Comment 12 Katrin Fischer 2023-10-03 11:31:25 UTC
(In reply to Kyle M Hall from comment #11)
> (In reply to Katrin Fischer from comment #9)
> > It's not the wording, it's the formatting. I'd forgo the <em> for quotes.
> 
> Katrin, can you have another look as this now that I've replaced them em
> tags?

Sorry, this fell through the cracks, will try to do it now!
Comment 13 Katrin Fischer 2023-10-03 12:35:45 UTC
Created attachment 156499 [details] [review]
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value

In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.

Test plan:
1) Create two items, one of which has the NFL status of "Ordered", the
   other having no NFL status
2) Enter those two barcodes in the inventory tool barcodes list
3) Check only "Ordered" in items.notforloan
4) Note the problem messages
5) Apply this patch
6) Re-run the inventory tool
7) Note the new clarified messages!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2023-10-03 12:35:47 UTC
Created attachment 156500 [details] [review]
Bug 34820: (QA follow-up) add filter, update CSV output

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2023-10-03 12:35:51 UTC
Created attachment 156501 [details] [review]
Bug 34820: (QA follow-up) Replace em tags with quotes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2023-10-03 12:35:54 UTC
Created attachment 156502 [details] [review]
Bug 34820: (QA follow-up) Fix span tag

One span tag was missing a <.
Comment 17 Tomás Cohen Arazi 2023-10-04 13:44:56 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 18 Fridolin Somers 2023-10-05 20:39:10 UTC
Arg we try to avoid double quotes in translated strings, because of JavaScript.
This string may not end in a JavaScript code but better be safe.

Can it be &quot; or single quotes ?

I see we use &quot; is some places :
https://git.koha-community.org/Koha-community/Koha/src/commit/af093305b8c936f20c49fa707d5bc58fc9059ba8/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/stage_marc_for_import.inc#L23
Comment 19 Katrin Fischer 2023-10-05 21:02:10 UTC
(In reply to Fridolin Somers from comment #18)
> Arg we try to avoid double quotes in translated strings, because of
> JavaScript.
> This string may not end in a JavaScript code but better be safe.
> 
> Can it be &quot; or single quotes ?
> 
> I see we use &quot; is some places :
> https://git.koha-community.org/Koha-community/Koha/src/commit/
> af093305b8c936f20c49fa707d5bc58fc9059ba8/koha-tmpl/intranet-tmpl/prog/en/
> includes/background_jobs/stage_marc_for_import.inc#L23

I actually checked, but our rule only applies to JS and this is not Javascript. It should not be able to break it in translation, no matter what people use.