When there is a hold for a "next available" item and multiple libraries/branches have that item available, each one is listed in the "Libraries" column of the "Holds to pull" page. Each library is separated by a <br> tag so that they are arranged in a vertical column. Unfortunately, the dropdown menu appears to use this column as a datasource, so it concatenates each library to produce one single string containing the codes/names of all the libraries. As a result, there is only one option when there should be 2 or more...
Created attachment 12122 [details] [review] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags While the new function I made works perfectly well, there might be a more efficient way of achieving the same outcome. I'm open to input, but it gets the job done. To Test Before Patching: 1) Create two items under the same bib record but with different home library locations. 2) Place a hold on the next available item (or two separate holds on the two separate items) *You'll notice the names of the two libraries in the field to the right of the hold's title. There is one library on each line, because they're "separated" by a linebreak <br> tag. *If you look at the drop-down menu at the bottom of the column, you will notice that the names of the two libraries have been concatenated together. If you look at the source, you will notice that there is a <br> tag that "glues" them together. 3) Apply the patch 4) Refresh your page and now you will see that the drop-down menu has separated those options, that there are no duplication of options, and that they have been sorted in alphabetical order.
Created attachment 12175 [details] [review] [SIGNED-OFF] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags This patch introduces a new javascript function that breaks apart option strings that are erroneously concatenated by br tags. The split strings are then checked against non-concatenated option strings, and pushed into the option array if there is no duplication. This function is nestled into the JQuery datatable function for populating the drop-down menu. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 12184 [details] [review] Bug 8508: Followup: Simplify the separateData js function I think this patch does the same job as previously. + It replaces tabulation characters with 4 spaces
Hi Owen and David, Could you confirmed that my proposed patch does the same job as previously ?
Created attachment 12227 [details] [review] [SIGNED-OFF] Bug 8508: Followup: Simplify the separateData js function
Yep, Jonathan. It looks good. Sorry about the tabs! I've started using two different editors, and I hadn't switched the second from tabs to spaces. That should be remedied now :) (In reply to comment #4) > Hi Owen and David, > > Could you confirmed that my proposed patch does the same job as previously ?
Sorry, but the follow-up does not apply : Applying: Bug 8508: Followup: Simplify the separateData js function fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 8508: Followup: Simplify the separateData js function When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/SIGNED-OFF-Bug-8508-Followup-Simplify-the-separate-TAB_O7.patch
It sounds like the problem is that this patch does not apply rather than that it failed QA. Owen, do you think you could rebase these two patches and reattach them to the bug?
Paul could you retest please. Looks good to me: % git reset --hard origin/master% git bz apply 8508 Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags [SIGNED-OFF] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags Apply? [yn] y Applying: Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags [SIGNED-OFF] Bug 8508: Followup: Simplify the separateData js function Apply? [yn] y Applying: Bug 8508: Followup: Simplify the separateData js function Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
Applying: Bug 8508: Followup: Simplify the separateData js function fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Does not apply
Created attachment 15358 [details] [review] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags This patch introduces a new javascript function that breaks apart option strings that are erroneously concatenated by br tags. The split strings are then checked against non-concatenated option strings, and pushed into the option array if there is no duplication. This function is nestled into the JQuery datatable function for populating the drop-down menu. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 15359 [details] [review] Bug 8508: Followup: Simplify the separateData js function I think this patch does the same job as previously. + It replaces tabulation characters with 4 spaces Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 16835 [details] [review] Bug 8508: Followup: Simplify the separateData js function I think this patch does the same job as previously. + It replaces tabulation characters with 4 spaces Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 16836 [details] [review] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags This patch introduces a new javascript function that breaks apart option strings that are erroneously concatenated by br tags. The split strings are then checked against non-concatenated option strings, and pushed into the option array if there is no duplication. This function is nestled into the JQuery datatable function for populating the drop-down menu. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 16837 [details] [review] Bug 8508: Followup: Simplify the separateData js function I think this patch does the same job as previously. + It replaces tabulation characters with 4 spaces Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
QA Comment: Looks good to me. Works fine. Passed QA
This patch has been pushed to master.
Pushed to 3.10.x will be in 3.10.6