Summary: | Number of elements in cart is not updated when records are deleted or merged | ||
---|---|---|---|
Product: | Koha | Reporter: | David Nind <david> |
Component: | Staff interface | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, martin.renvoize, michaela.sieber, oleonard, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 27767: Remove readCookieValue
Bug 27767: Update the number of elements in cart if biblio is removed |
Description
David Nind
2021-02-24 01:30:06 UTC
Also true if you remove a record from the detail page. Created attachment 117561 [details] [review] Bug 27767: Remove readCookieValue This JS function is not used. It seems that "quit" is not used either Created attachment 117562 [details] [review] Bug 27767: Update the number of elements in cart if biblio is removed If a bibliographic record is added to the cart then removed (from the detail page or using the batch delete tool), the number of elements in the cart is never updated. This patch reworks how the cookie "intranet_bib_list" is handled in basket.js. The current code is really bad and error prone (parsing a string). Here we are handling the biblionumbers using a JSON serialised array, that makes everything much more simple. This is just a start, there are much more to do here: 1. Continue to clean the code (addMultiple and delSelRecords for instance) 2. Confirm that the behaviour about the the parent flag (from readCookie) I removed is still working 3. Adapt code at the OPAC 4. Test everything (that's quite huge as it's used from different views) I'd like a bit of help, anyone willing to code golf on this one? The test plan talks about items, but the cart actually shows the number of records. What works: * Adding and removing from the detail page now updates the number What doesn't work: * Deleting the record doesn't update the cart number * Batch deleting records * Merging records Additional impact of the bug: downloading cart doesn't work (internal server error) Mitigation: Empty cart to get rid of the invalid data. Valid records can be added to a list to easily re-add them after. |