To test"
1 - Edit a record in advanced cataloging editor with field helpers enabled
2 - Choose a material type, not BKS, from dropdown
3 - Set the first position to something
4 - Save the record
5 - 006 shows 'BKS'
6 - Apply patch
7 - Reload
8 - Record should show correct value
9 - Edit 006 and confirm the first position correctly determines material type
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
return $result[0];
},
+ materialTypeMapping: {
+ a: 'BKS',
+ c: 'MU',
+ d: 'MU',
+ e: 'MPS',
+ f: 'MPS',
+ g: 'VM',
+ i: 'MU',
+ j: 'MU',
+ k: 'VM',
+ m: 'CF',
+ o: 'VM',
+ p: 'MX',
+ r: 'VM',
+ s: 'CR',
+ t: 'BKS',
+ },
+ getMaterial: function () {
+ return this.materialTypeMapping[this.text.substring(0, 1)];
+ },
postCreate: function( node, mark ) {
this.createFromXML( 'marc21/xml/006' );
}