Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags
Summary: Holds to Pull : Library dropdown options are erroneously concatenated by br tags
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: David Cook
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-26 07:35 UTC by David Cook
Modified: 2014-05-26 21:05 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags (2.39 KB, patch)
2012-09-10 22:00 UTC, David Cook
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags (2.43 KB, patch)
2012-09-12 16:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8508: Followup: Simplify the separateData js function (2.32 KB, patch)
2012-09-13 08:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8508: Followup: Simplify the separateData js function (2.43 KB, patch)
2012-09-14 13:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags (2.38 KB, patch)
2013-02-15 12:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8508: Followup: Simplify the separateData js function (2.20 KB, patch)
2013-02-15 12:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8508: Followup: Simplify the separateData js function (1.85 KB, patch)
2013-03-24 17:44 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags (2.65 KB, patch)
2013-03-24 17:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 8508: Followup: Simplify the separateData js function (1.85 KB, patch)
2013-03-24 17:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2012-07-26 07:35:13 UTC
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...
Comment 1 David Cook 2012-09-10 22:00:43 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-09-12 16:23:14 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2012-09-13 08:21:47 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2012-09-13 08:23:41 UTC
Hi Owen and David,

Could you confirmed that my proposed patch does the same job as previously ?
Comment 5 Owen Leonard 2012-09-14 13:45:12 UTC Comment hidden (obsolete)
Comment 6 David Cook 2012-09-17 19:49:42 UTC
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 ?
Comment 7 Paul Poulain 2012-10-08 17:35:35 UTC
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
Comment 8 Jared Camins-Esakov 2013-01-02 03:01:19 UTC
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?
Comment 9 Jonathan Druart 2013-01-03 10:51:19 UTC
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
Comment 10 Marcel de Rooy 2013-02-15 10:44:53 UTC
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
Comment 11 Jonathan Druart 2013-02-15 12:43:20 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2013-02-15 12:43:33 UTC Comment hidden (obsolete)
Comment 13 Marcel de Rooy 2013-03-24 17:44:28 UTC Comment hidden (obsolete)
Comment 14 Marcel de Rooy 2013-03-24 17:45:00 UTC
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>
Comment 15 Marcel de Rooy 2013-03-24 17:45:04 UTC
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>
Comment 16 Marcel de Rooy 2013-03-24 17:46:02 UTC
QA Comment:
Looks good to me. Works fine.

Passed QA
Comment 17 Jared Camins-Esakov 2013-03-30 12:14:51 UTC
This patch has been pushed to master.
Comment 18 Chris Cormack 2013-04-24 21:26:47 UTC
Pushed to 3.10.x will be in 3.10.6