Opened 15 years ago

Closed 15 years ago

#1215 closed enhancement (wontfix)

Batch importer does not update parent in some cases

Reported by: Jari Häkkinen Owned by: everyone
Priority: major Milestone:
Component: coreplugins Version: 2.9
Keywords: Cc:


This may not be a bug. If it is not, then consider it as an enhancement request.

I am running batch importers, and in one of the imports I managed to have too high number in the Parent used quantity column. I corrected the number and rerun the importer in update mode mapping only the item name and the parent used quantity (I did not map the parent column). The message was that items where updated. However, when I checked the parent these were not updated. Actually nothing was updated. I made a third run still in update mode, now mapping the item name, parent used quantity, and the parent item. The same message and yes now the parents where updated.

I think the parents should be updated even if the parent column is not mapped. There is a connection already and it should be utilized. Of course, there may be several parents but in this case an error should be reported. If we select not to support updating the parent without explicitly mapping the parent, then the plugin should not report that items where updated since no real update takes place.

Change History (2)

comment:1 by Nicklas Nordborg, 15 years ago

Type: defectenhancement

I would not consider this a defect. The specifications says that: In some cases a multi-item reference is bundled with simple values. Eg. used quantity of a source biomaterial.... Technically it would be possible to not map the parent when there is only one of a different type, but I would prefer a consistent implementation were a parent mapping is required in all cases. In any case, the parent must have been in the file to begin with and there is really no overhead in mapping the column.

The other part of this ticket (not report that items where updated since no real update takes place) is simply not possible, because we never care about the old values. All we care about is setting the values as they are in the file and let Hibernate decide if an update is needed or not. This is kind of related to the problems described in #966.

comment:2 by Nicklas Nordborg, 15 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.