Comment #2 on issue 2384 by [email protected]: EAD - dates not importing
http://code.google.com/p/qubit-toolkit/issues/detail?id=2384
I haven't been able to figure out what conditions lead to the date problem,
but it seems to come down to the part of the setDates method that tries to
link a date to an existing creator. Starting at line 1389 of
lib/model/QubitInformationObject.php
// assign the dates to the same event as the creator for this
information object
// if there is more than one creator, assign it to the first one that
is returned
if (count($creationEvents = $this->getCreationEvents()) > 0)
{
$event = $creationEvents[0];
$event->setIndexOnSave(false);
$event->setStartDate($normalizedDate['start']);
$event->setEndDate($normalizedDate['end']);
$event->setTypeId($eventTypeId);
$event->setDate($date);
$event->save();
}
- I was encountering cases where the criteria was met (at least one
creation event), but the date wasn't being added. Changing $event->save()
to $this->events[] = $event;
seems to solve that.
- but for the most part, I couldn't replicate the criteria being met,
unless I hardcoded information_object_id in getCreationEvents. In one case
a *different* actor actually got linked up, but now I can't replicate that.
Perhaps the information_object_id has not been created at this point during
the routine? I don't understand the object oriented stuff enough to
troubleshoot this aspect.
- in earlier import work that I've done, the linking never seems to have
worked; there is always a date event separate from the creator (I remember
other reports of this too). So this may be the source of the problem but
under normal circumstances no creation events are found?
- so, a workaround would be to comment out the attempted linking, and force
the routine to add a new event.
--
You received this message because you are subscribed to the Google Groups "Qubit
Toolkit Issues" 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-issues?hl=en.