The button to 'Close and export as PDF' in the basket groups page seems to be broken. To test: 0) Make sure to have budgets, funds, and vendors set up in the acquisitions module 1) Go to Acquisitions 2) Search for a vendor 3) Create a new basket 4) Add materials to the basket 5) Close the basket (do NOT create a basket group at this time) 6) Click on the Basket groups tab on the left 7) Create a new basket group and add the basket (do NOT check the 'close basket group' box) 8) From the open basket groups list, click 'Close and export as PDF' --> Nothing happens In order to export as PDF, you have to edit the basket group, check the 'Close basket group' box, save and then export as PDF.
Created attachment 146461 [details] [review] Bug 31056: Restore closeandprint function on basketgroups page Bug 13614 removed the basketgroup.js asset from the basket group page. This file includes the closeandprint function used for closing and printing the PDF from the open basket groups tab. The patch restores just this function directly in the file where it's needed as this is the only spot and it's only a few lines. The rest of basketgroup.js appears unused. To test: * Create a basket with one or more oder lines * Close the basket and check the checkbox to add it to a basket group * Reopen the basket group from the basket groups page * Verify the close and print only leads to a JS error and nothing happens * Apply patch * Repeat and verify you can now 'Close and print' from the open basket group tab * Verify all other buttons work as expected as well
Created attachment 146507 [details] [review] Bug 31056: Restore closeandprint function on basketgroups page Bug 13614 removed the basketgroup.js asset from the basket group page. This file includes the closeandprint function used for closing and printing the PDF from the open basket groups tab. The patch restores just this function directly in the file where it's needed as this is the only spot and it's only a few lines. The rest of basketgroup.js appears unused. To test: * Create a basket with one or more oder lines * Close the basket and check the checkbox to add it to a basket group * Reopen the basket group from the basket groups page * Verify the close and print only leads to a JS error and nothing happens * Apply patch * Repeat and verify you can now 'Close and print' from the open basket group tab * Verify all other buttons work as expected as well Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Thanks Katrin!
(In reply to Caroline Cyr La Rose from comment #3) > Thanks Katrin! You are very welcome! :)
I don't understand, it's in koha-tmpl/intranet-tmpl/prog/js/basketgroup.js:function closeandprint(bg){ You are not supposed to redefine it here. The js file still exists, but never used I think you may simply need to re-add it.
(In reply to Jonathan Druart from comment #5) > I don't understand, it's in > > koha-tmpl/intranet-tmpl/prog/js/basketgroup.js:function closeandprint(bg){ > > You are not supposed to redefine it here. > > The js file still exists, but never used > > I think you may simply need to re-add it. I explained that in the commit message: Bug 13614 removed the basketgroup.js asset from the basket group page. This file includes the closeandprint function used for closing and printing the PDF from the open basket groups tab. The patch restores just this function directly in the file where it's needed as this is the only spot and it's only a few lines. The rest of basketgroup.js appears unused. And I also filed bug 32935 to remove basketgroup.js.
Created attachment 147192 [details] [review] Bug 31056: Restore closeandprint function on basketgroups page Bug 13614 removed the basketgroup.js asset from the basket group page. This file includes the closeandprint function used for closing and printing the PDF from the open basket groups tab. The patch restores just this function directly in the file where it's needed as this is the only spot and it's only a few lines. The rest of basketgroup.js appears unused. To test: * Create a basket with one or more oder lines * Close the basket and check the checkbox to add it to a basket group * Reopen the basket group from the basket groups page * Verify the close and print only leads to a JS error and nothing happens * Apply patch * Repeat and verify you can now 'Close and print' from the open basket group tab * Verify all other buttons work as expected as well Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> JD Amended patch: fix indentation and spacing Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
PQA as it restores the exact same function that existed already, but this sleep 3s is wrong.
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to stable for 22.11.x
Missing dependencies for 22.05.x, no backport.
*** Bug 32077 has been marked as a duplicate of this bug. ***