[Bug 36649] New: Adding recently added items to processing from waiting list does not work if processing includes information from database columns
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Bug ID: 36649 Summary: Adding recently added items to processing from waiting list does not work if processing includes information from database columns Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Preservation Assignee: koha-bugs@lists.koha-community.org Reporter: anneli.osterman@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com After adding items to the waiting list in Preservation module you get a button "Add last x items to a train". If you click it and select a processing that contains columns from the database (for example biblio.title or biblio.author), the submit button does not work and items are not added to the selected processing. If the processing uses only free text or authorised values the adding of the items works. I tested this in version 23.11 and on PTFS Europe's sandbox version 23.12. How to reproduce: 1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author. 2. Create a new train. 3. Add items to the waiting list. 4. Click on "Add last x items to the train" button. 5. Choose the train you created on number 2. 6. Choose the processing you added on number 1. 7. Try to click the Submit button. 8. Notice that the button does not work and items are not added to the selected processing. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emmi.takkinen@koha-suomi.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- This problem is caused by line 185 in TrainsFormAddItems.vue: item.biblio[api_attribute]. Apparently, if attribute uses column from biblio or biblioitems table, attribute should be fetched from biblio array which is part of item object. However there is no such an array. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@koha-suomi.fi |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 165275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165275&action=edit Bug 36649: Correctly embed biblio when retrieving items when adding to a train I didn't find when this regression has been introduced but the third parameter here is the headers, not parameters, we should not repeat "headers". Test plan: 1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author. 2. Create a new train. 3. Add items to the waiting list. 4. Click on "Add last x items to the train" button. 5. Choose the train you created on number 2. 6. Choose the processing you added on number 1. 7. Try to click the Submit button. => Without the patch nothing happens and there is a JS error in the console: Uncaught TypeError: item.biblio is undefined => With this patch applied the item is correctly added to the train and the attribute is properly populated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|emmi.takkinen@koha-suomi.fi |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165275|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 165372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165372&action=edit Bug 36649: Correctly embed biblio when retrieving items when adding to a train I didn't find when this regression has been introduced but the third parameter here is the headers, not parameters, we should not repeat "headers". Test plan: 1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author. 2. Create a new train. 3. Add items to the waiting list. 4. Click on "Add last x items to the train" button. 5. Choose the train you created on number 2. 6. Choose the processing you added on number 1. 7. Try to click the Submit button. => Without the patch nothing happens and there is a JS error in the console: Uncaught TypeError: item.biblio is undefined => With this patch applied the item is correctly added to the train and the attribute is properly populated. Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165372|0 |1 is obsolete| | --- Comment #4 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 165376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165376&action=edit Bug 36649: Correctly embed biblio when retrieving items when adding to a train I didn't find when this regression has been introduced but the third parameter here is the headers, not parameters, we should not repeat "headers". Test plan: 1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author. 2. Create a new train. 3. Add items to the waiting list. 4. Click on "Add last x items to the train" button. 5. Choose the train you created on number 2. 6. Choose the processing you added on number 1. 7. Try to click the Submit button. => Without the patch nothing happens and there is a JS error in the console: Uncaught TypeError: item.biblio is undefined => With this patch applied the item is correctly added to the train and the attribute is properly populated. Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m --- Comment #5 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Before, we added x-koha-embed headers at the http client level (see erm-api-client.js) not at the vue component level as you're doing here @Joubu. Not a blocker, but may be worth mentioning as it's a deviation of the pattern? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Pedro Amorim from comment #5)
Before, we added x-koha-embed headers at the http client level (see erm-api-client.js) not at the vue component level as you're doing here @Joubu.
Not a blocker, but may be worth mentioning as it's a deviation of the pattern?
This is expected, we are supposed to embed when needed. Here we don't want to embed biblio's info from everywhere we are fetching items. It's how getAll is designed: get items() { return { getAll: (query, params, headers) => -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30708 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30708 [Bug 30708] Creation of a new 'Preservation' module -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to stable |RESOLVED --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36649 Bug 36649 depends on bug 30708, which changed state. Bug 30708 Summary: Creation of a new 'Preservation' module https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30708 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org