Bug 27752 - Correct ESLint errors in batchMod.js
Summary: Correct ESLint errors in batchMod.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 27751
  Show dependency treegraph
 
Reported: 2021-02-22 15:30 UTC by Owen Leonard
Modified: 2021-03-23 06:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
This patch makes minor changes to batchMod.js used in Tools > Batch item modification. This addresses errors raised by ESLint, including white space changes, to make sure it meets coding guideline JS8: Follow guidelines set by ESLint.
Version(s) released in:
21.05.00,20.11.04,20.05.10


Attachments
Bug 27752: Correct eslint errors in batchMod.js (10.48 KB, patch)
2021-02-22 15:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27752: Correct eslint errors in batchMod.js (10.52 KB, patch)
2021-02-24 02:14 UTC, David Nind
Details | Diff | Splinter Review
Bug 27752: Correct eslint errors in batchMod.js (10.58 KB, patch)
2021-03-04 14:03 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 15:30:06 UTC
Following coding guideline JS8: "Follow guidelines set by ESLint," some errors should be corrected in batchMod.js.
Comment 1 Owen Leonard 2021-02-22 15:59:42 UTC
Created attachment 117158 [details] [review]
Bug 27752: Correct eslint errors in batchMod.js

This patch makes minor changes to batchMod.js in order to address errors
raised by ESLint. These changes include whitespace changes, so diff
accordingly.

To test, apply the patch and go to Tools -> Batch item modification.

- Submit a batch of barcodes for modification.
- Uncheck some checkboxes to hide columns in the table showing your
  submitted items.
- Return to the batch item modification page and submit your batch
  again.
- The columns you selected should still be hidden.
- Submit a batch of items for deletion.
- The same columns should be hidden here too.

To confirm that ESLint is happy with the changes you could open the file
for editing using an editor with ESLint integration, or install ESLint
on the command line:
https://eslint.org/docs/user-guide/command-line-interface
Comment 2 David Nind 2021-02-24 02:14:23 UTC
Created attachment 117230 [details] [review]
Bug 27752: Correct eslint errors in batchMod.js

This patch makes minor changes to batchMod.js in order to address errors
raised by ESLint. These changes include whitespace changes, so diff
accordingly.

To test, apply the patch and go to Tools -> Batch item modification.

- Submit a batch of barcodes for modification.
- Uncheck some checkboxes to hide columns in the table showing your
  submitted items.
- Return to the batch item modification page and submit your batch
  again.
- The columns you selected should still be hidden.
- Submit a batch of items for deletion.
- The same columns should be hidden here too.

To confirm that ESLint is happy with the changes you could open the file
for editing using an editor with ESLint integration, or install ESLint
on the command line:
https://eslint.org/docs/user-guide/command-line-interface

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-02-24 02:16:18 UTC
No changes to behaviour after applying the patch and walking through the test plan.

With the Atom text editor and the linter-eslint package the number of error and warnings goes from 134 to 0!
Comment 4 Katrin Fischer 2021-03-04 14:03:04 UTC
Created attachment 117726 [details] [review]
Bug 27752: Correct eslint errors in batchMod.js

This patch makes minor changes to batchMod.js in order to address errors
raised by ESLint. These changes include whitespace changes, so diff
accordingly.

To test, apply the patch and go to Tools -> Batch item modification.

- Submit a batch of barcodes for modification.
- Uncheck some checkboxes to hide columns in the table showing your
  submitted items.
- Return to the batch item modification page and submit your batch
  again.
- The columns you selected should still be hidden.
- Submit a batch of items for deletion.
- The same columns should be hidden here too.

To confirm that ESLint is happy with the changes you could open the file
for editing using an editor with ESLint integration, or install ESLint
on the command line:
https://eslint.org/docs/user-guide/command-line-interface

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-03-05 12:52:04 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-03-12 07:55:28 UTC
Pushed to 20.11.x for 20.11.04
Comment 7 Andrew Fuerste-Henry 2021-03-14 19:46:53 UTC
Pushed to 20.05.x for 20.05.10
Comment 8 Victor Grousset/tuxayo 2021-03-23 06:25:56 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.