View | Details | Raw Unified | Return to bug 22867
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_22867-pipe_delimited_UniqueItemFields.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{UPDATE systempreferences SET value = REPLACE( value, ' ', '|' ) WHERE variable = 'UniqueItemFields'; });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 22867 - UniqueItemFields preference value should be pipe-delimited)\n";
7
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +1 lines)
Lines 12-18 Acquisitions: Link Here
12
        -
12
        -
13
            - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/items.html' target='blank'>database columns</a> should be unique in an item:"
13
            - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/items.html' target='blank'>database columns</a> should be unique in an item:"
14
            - pref: UniqueItemFields
14
            - pref: UniqueItemFields
15
            - (separated by a space)
15
            - (separate columns with |)
16
        -
16
        -
17
            - When closing or reopening a basket,
17
            - When closing or reopening a basket,
18
            - pref: BasketConfirmations
18
            - pref: BasketConfirmations
(-)a/koha-tmpl/intranet-tmpl/prog/js/additem.js (-3 / +2 lines)
Lines 154-160 function cloneItemBlock(index, unique_item_fields, callback) { Link Here
154
    }
154
    }
155
    var dont_copy_fields = new Array();
155
    var dont_copy_fields = new Array();
156
    if(unique_item_fields) {
156
    if(unique_item_fields) {
157
        var dont_copy_fields = unique_item_fields.split(' ');
157
        var dont_copy_fields = unique_item_fields.split('|');
158
        for(i in dont_copy_fields) {
158
        for(i in dont_copy_fields) {
159
            dont_copy_fields[i] = "items." + dont_copy_fields[i];
159
            dont_copy_fields[i] = "items." + dont_copy_fields[i];
160
        }
160
        }
Lines 247-253 function check_additem(unique_item_fields) { Link Here
247
    var data = new Object();
247
    var data = new Object();
248
    data['field'] = new Array();
248
    data['field'] = new Array();
249
    data['value'] = new Array();
249
    data['value'] = new Array();
250
    var array_fields = unique_item_fields.split(' ');
250
    var array_fields = unique_item_fields.split('|');
251
    $(".order_error").empty(); // Clear error div
251
    $(".order_error").empty(); // Clear error div
252
252
253
    // Check if a value is duplicated in form
253
    // Check if a value is duplicated in form
254
- 

Return to bug 22867