Bug 27930 - Move _escape_* functions from acq/parcel.tt to be re-usable
Summary: Move _escape_* functions from acq/parcel.tt to be re-usable
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 20212
Blocks: 26273
  Show dependency treegraph
 
Reported: 2021-03-11 14:20 UTC by Martin Renvoize
Modified: 2021-03-23 12:46 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04


Attachments
Bug 27930: Move _escape_* from acqui/parcel.tt to js/staff-global.js (13.16 KB, patch)
2021-03-11 14:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27930: Move _escape_* from acqui/parcel.tt to js/staff-global.js (13.24 KB, patch)
2021-03-11 15:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27930: [stables] Move _escape_* from acqui/parcel.tt to js/staff-global.js (1.51 KB, patch)
2021-03-11 15:41 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-03-11 14:20:29 UTC
A pair of very simple but very useful escaping functions can be found in parcel.tt. They should be moved into staff-global.js so they can be adopted more widely.
Comment 1 Martin Renvoize 2021-03-11 14:27:31 UTC
Created attachment 118128 [details] [review]
Bug 27930: Move _escape_* from acqui/parcel.tt to js/staff-global.js

This patch moves the _escape_str and _escape_price functions into the
staff-global.js include

Test plan
1/ The acquisitions parcel page should look the same before and after
the patch.
2/ Signoff
Comment 2 Jonathan Druart 2021-03-11 15:36:02 UTC
Created attachment 118153 [details] [review]
Bug 27930: Move _escape_* from acqui/parcel.tt to js/staff-global.js

This patch moves the _escape_str and _escape_price functions into the
staff-global.js include

Test plan
1/ The acquisitions parcel page should look the same before and after
the patch.
2/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2021-03-11 15:37:52 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 4 Jonathan Druart 2021-03-11 15:41:43 UTC
Created attachment 118154 [details] [review]
Bug 27930: [stables] Move _escape_* from acqui/parcel.tt to js/staff-global.js

This patch moves the _escape_str and _escape_price functions into the
staff-global.js include

Test plan
1/ The acquisitions parcel page should look the same before and after
the patch.
2/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: For stable branch the functions didn't exist.
Comment 5 Jonathan Druart 2021-03-11 15:42:42 UTC
RMaints, I would recommend you to pick this one to anticipate a call to a missing function when backporting a patch.
Comment 6 Fridolin Somers 2021-03-19 14:30:30 UTC
(In reply to Jonathan Druart from comment #5)
> RMaints, I would recommend you to pick this one to anticipate a call to a
> missing function when backporting a patch.

Good point.
Comment 7 Fridolin Somers 2021-03-19 14:40:17 UTC
Ah but _escape_* methods have been added by Bug 20212 not backported, that why there is a "stable" patch.
OK
Comment 8 Fridolin Somers 2021-03-19 14:41:13 UTC
Pushed to 20.11.x for 20.11.04
Comment 9 Andrew Fuerste-Henry 2021-03-23 12:46:26 UTC
Not backported to 20.05