Bug 27754 - Correct eslint errors in basket.js
Summary: Correct eslint errors in basket.js
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23833
  Show dependency treegraph
 
Reported: 2021-02-22 17:43 UTC by Owen Leonard
Modified: 2021-03-22 16:10 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
This patch makes minor changes to basket.js in the staff interface templates to remove ESLint warnings. Besides whitespace changes, most changes are to correct undeclared or unnecessarily declared variables.
Version(s) released in:
21.05.00,20.11.04,20.05.10


Attachments
Bug 27754: Correct eslint errors in basket.js (10.31 KB, patch)
2021-02-22 19:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27754: Correct eslint errors in basket.js (10.36 KB, patch)
2021-02-24 00:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 27754: Correct eslint errors in basket.js (10.42 KB, patch)
2021-02-28 17:42 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 Owen Leonard 2021-02-22 17:43:01 UTC
Following coding guideline JS8: "Follow guidelines set by ESLint," some errors should be corrected in basket.js in the staff interface.
Comment 1 Owen Leonard 2021-02-22 19:13:36 UTC
Created attachment 117173 [details] [review]
Bug 27754: Correct eslint errors in basket.js

This patch makes minor changes to basket.js in the staff interface
templates in order to quiet warnings from ESLint. Besides whitespace,
most changes are to correct undeclared or unnecessarily declared
variables.

To test, apply the patch and verify that the cart still works
correctly.

 - Perform a catalog search in the staff interface.
 - Test adding single or multiple items to the cart from the search
   results page.
 - Testing adding and removing titles to the cart from the bibliographic
   detail page.
 - Open the cart and test the various controls in the toolbar to confirm
   that they still work correctly.
Comment 2 David Nind 2021-02-24 00:57:23 UTC
Created attachment 117229 [details] [review]
Bug 27754: Correct eslint errors in basket.js

This patch makes minor changes to basket.js in the staff interface
templates in order to quiet warnings from ESLint. Besides whitespace,
most changes are to correct undeclared or unnecessarily declared
variables.

To test, apply the patch and verify that the cart still works
correctly.

 - Perform a catalog search in the staff interface.
 - Test adding single or multiple items to the cart from the search
   results page.
 - Testing adding and removing titles to the cart from the bibliographic
   detail page.
 - Open the cart and test the various controls in the toolbar to confirm
   that they still work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-02-24 01:42:15 UTC
Have added Bug 27767 - if you use batch delete from a cart, the number of items shown in the cart menu item don't reduce, but the items are removed from the cart. This behaviour was exhibited before the patch was applied.
Comment 4 David Nind 2021-02-24 02:02:57 UTC
Also, no ESLint warnings or errors identified using the Atom text editor and the linter-eslint package.
Comment 5 Katrin Fischer 2021-02-28 17:42:17 UTC
Created attachment 117419 [details] [review]
Bug 27754: Correct eslint errors in basket.js

This patch makes minor changes to basket.js in the staff interface
templates in order to quiet warnings from ESLint. Besides whitespace,
most changes are to correct undeclared or unnecessarily declared
variables.

To test, apply the patch and verify that the cart still works
correctly.

 - Perform a catalog search in the staff interface.
 - Test adding single or multiple items to the cart from the search
   results page.
 - Testing adding and removing titles to the cart from the bibliographic
   detail page.
 - Open the cart and test the various controls in the toolbar to confirm
   that they still work correctly.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-03-01 10:29:13 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 7 Fridolin Somers 2021-03-04 09:39:32 UTC
Pushed to 20.11.x for 20.11.04
Comment 8 Andrew Fuerste-Henry 2021-03-05 21:29:33 UTC
Pushed to 20.05.x for 20.05.10
Comment 9 Victor Grousset/tuxayo 2021-03-22 16:10:07 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.