Author: mcantelon
Date: Thu Dec 29 15:02:07 2011
New Revision: 10474
Log:
Fixed bug with note text transformation logic and implemented for OLD PHOTO NO
column.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Thu Dec 29 14:39:51 2011
(r10473)
+++ trunk/lib/task/csvImportTask.class.php Thu Dec 29 15:02:07 2011
(r10474)
@@ -94,7 +94,13 @@
'RAD note - statements of responsibility' =>
'statementOfResponsibilityRelatingToPublishersSeries'
),
'noteMap' => array(
- 'Rad note – conservation' => array('typeId' => 231)
+ 'Rad note – conservation' => array('typeId' => 231),
+ 'OLD PHOTO NO' => array(
+ 'typeId' => 247,
+ 'transformationLogic' => function(&$self, $text) {
+ return 'Old Photo Number: '. $text;
+ }
+ )
),
'rowInit' => function(&$self) {
$self->informationObject = new QubitInformationObject;
@@ -322,7 +328,10 @@
else if (isset($self->noteMap) && isset($self->noteMap[$columnName]) &&
trim($value))
{
// otherwise, if maps to a note, create it
- $self->createNote($self->noteMap[$columnName]['typeId'], $value);
+ $transformationLogic =
(isset($self->noteMap[$columnName]['transformationLogic']))
+ ? $self->noteMap[$columnName]['transformationLogic']
+ : false;
+ $self->createNote($self->noteMap[$columnName]['typeId'], $value,
$transformationLogic);
}
});
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.