Bug 36047: Remove jQuery selector from conditional
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 22 Feb 2024 15:42:27 +0000 (15:42 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 11 Mar 2024 09:57:57 +0000 (10:57 +0100)
commit16d3402cfec7a9a689c52a9d9fb48b601dc32ef4
tree0ef094ab89c189ad454614f51bc33c517dd6b762
parente154184b7a8af8ebaca1848284848775674db291
Bug 36047: Remove jQuery selector from conditional

This prevents the jQuery from breaking if the reason contains an
apostrophe character.

1. Create a suggestion
   1.1. Go to Acquisitions > Suggestions
   1.2. Click New purchase suggestion
   1.3. Enter a title
   1.4. Click Submit your suggestion

2. Update the suggestion to accepted and add a reason with an apostrophe
   2.1. In the suggestions list, check the box next to the suggestion
   2.2. At the bottom of the screen, choose Mark selected as: Accepted
   2.3. In With this reason, choose Others...
   2.4. Enter a reason with an apostrophe (my case was in French :
        Disponible en impression à la demande (POD). S'attendre à un
        long temps d'attente)
   2.5. Click Submit

3. Order the suggestion
   3.1. Go to Acquisitions
   3.2. Search for a vendor
   3.3. Click New > Basket
   3.4. Enter a basket name
        (Optional: for testing I like to change Create items when:
        cataloging the record)
   3.5. Click Save
   3.6. Click Add to basket
   3.7. Click From a suggestion
   3.8. Click Order next to the suggestion
   3.9. Enter order details
   3.10. Click Save
   3.11. Click Close basket
   3.12. Click Yes, close

4. Receive the order
   4.1. Click Receive shipments
   4.2. Enter a Vendor invoice number
   4.3. Click Next
   4.4. Click Receive next to the order
        --> Page stays In processing forever

Apply patch. Repeat. Notice the page now renders correctly.
Extra: Add an entry containg an apostrophe to the SUGGEST authorized
values category and repeat test plan. Confirm everything works as
expected.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4515581effb9ff17e5a74c5b624805d330082c27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt