Koha/koha-tmpl/intranet-tmpl/prog/en/js
Fridolyn SOMERS 7a5eac3a51 Bug 10648 - In records merge greatest field can not be added
When merging 2 records (/cgi-bin/koha/cataloguing/merge.pl), the destination record is build using the fields and subfields checked in source records.
When a field is checked, the javascript code searches in destination record a field with a greater tag number to insert new field before.
When the new field tag number is greater than all existing field tag numbers, the field is not added.

This patch corrects this by adding at end if no greater field tag number exists. Also adds a sort of fields by tag number because all mergo code is based on this.

Test plan :
- Add to a framework a repeatable field with the greater non existing tag number. For example 998.
- Edit 2 records with this framework and add them a value in this tag.
- Put those records is a list
- Go to this list and check the two records
- Click on "Merge selected"
- Click on next
- Go to second source record
- Click on the greatest tag number. for example 998.
=> The field is added at the end of destination record

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described, no regressions.
2014-08-05 20:17:17 -03:00
..
pages Bug 11703 [QA Followup] - Allow keyboard navigation of tabs 2014-07-03 11:22:11 -03:00
acq.js Bug 7180: (follow-up) fix various issues 2014-05-04 19:56:59 +00:00
additem.js Bug 10576: make strings in additem.js accessible to translation 2013-07-22 15:40:21 +00:00
ajax.js Bug 2774 - Path to theme is hard-coded in many places 2013-07-18 16:49:18 +00:00
background-job-progressbar.js Bug 9113: fix handling of certain characters by item batch modification tool 2013-07-05 15:35:25 +00:00
basket.js Bug 12150 - Use more javascript string formatting in intranet for translated strings. 2014-07-03 09:52:48 -03:00
basketgroup.js Bug 10533: move JavaScript functions for basket groups to a separate file 2014-04-18 19:25:12 +00:00
cataloging.js Bug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler 2014-06-24 09:39:53 -03:00
checkouts.js Bug 11703: (qa followup) consistency in svc 2014-07-03 12:38:13 -03:00
datatables.js Bug 12150 - Use more javascript string formatting in intranet for translated strings. 2014-07-03 09:52:48 -03:00
holds.js Bug 11703: (followup) svc/holds invoked with trailing .pl 2014-07-03 14:05:23 -03:00
localcovers.js Bug 8264 - local cover images not working in IE8 [ prog ] 2013-05-01 06:16:38 -04:00
members.js Bug 12150 - Use more javascript string formatting in intranet for translated strings. 2014-07-03 09:52:48 -03:00
merge-record.js Bug 10648 - In records merge greatest field can not be added 2014-08-05 20:17:17 -03:00
offlinecirc.js Bug 10240: QA follow-up 2013-10-11 01:57:03 +00:00
prevent_submit.js Bug 10310: Followup Prevent submitting form with enter does not work with IE 2013-05-23 07:32:50 -07:00
staff-global.js Bug 12138 - Use placeholders in translatable Javascript strings 2014-04-27 21:24:04 +00:00
xmlControlfield.js Bug 12150 - Use more javascript string formatting in intranet for translated strings. 2014-07-03 09:52:48 -03:00