https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30174

            Bug ID: 30174
           Summary: Unable to get rancor/advanced cataloguing editor to
                    print equals sign ('=') from macros
 Change sponsored?: ---
           Product: Koha
           Version: 21.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Cataloging
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

On Rancor/Advanced Cataloguing Editor we cannot add a macro that prints an
equals sign ('=') to a MARC tag. 

For example, we have a macro that looks like this
'''
new 856=‡zClick here to access book
online‡uhttps://proxy.dml.vic.edu.au/login?url
indicators=40
'''
but we need to then manually add an equals sign to the end of the URL before we
can past the proper URL for the resource in question. If we try to add the
equals sign with the macro 
'''
new 856=‡zClick here to access book
online‡uhttps://proxy.dml.vic.edu.au/login?url=
indicators=40
'''
and then run it we end up with the error
'''
Failed to run macro:
Line 1: unrecognized command
'''

Is there a way to (maybe) escape characters in macros so they can be printed to
MARC?

Tasha Bales also reported on the Koha email list (2022-02-22) that she has also
tried to substitute "=" and "=" on the macro with similar
(non)results.

In response to Tasha's email Jonathan Druart replied (2022-02-24) that this
patch may fix the problem:

'''
diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/macros/rancor.js
b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/macros/rancor.js
index e9b484ef600..f25e7273aaf 100644
--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/macros/rancor.js
+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/macros/rancor.js
@@ -149,7 +149,7 @@ define( [ 'marc-editor' ], function( MARCEditor ) {
                 target.delete();
             }
         } ],
-        [ /^([^=]+)=([^=]*)$/, function( lhs_desc, rhs_desc ) {
+        [ /^([^=]+)=(.*)$/, function( lhs_desc, rhs_desc ) {
             var lhs_closure = _generate( _lhsGenerators, lhs_desc );
             if ( !lhs_closure ) return null;

'''

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to