[Koha-bugs] [Bug 30174] New: Unable to get rancor/advanced cataloguing editor to print equals sign ('=') from macros
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Feb 24 00:36:48 CET 2022
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: koha-bugs at lists.koha-community.org
Reporter: clopez at dml.vic.edu.au
QA Contact: testopia at bugs.koha-community.org
CC: m.de.rooy at rijksmuseum.nl
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.
More information about the Koha-bugs
mailing list