#1642 closed enhancement (fixed)
Add support for column mapping that selects a project default item in batch item importers — at Version 4
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.1 |
Component: | coreplugins | Version: | |
Keywords: | Cc: |
Description (last modified by )
If a property is not mapped to a column in the batch item importers and project default item exists for the property (eg. a sampling protocol) the core will automatically set that property when creating new items.
Note that this is a feature of the core and that the batch importers doesn't care about project default items at all.
But, we would like to change this so that a column mapping could, for example, be an expression that select a project default item. Since there is already support for the JEP parser in column mappings the functionality can be provided by defining a set of new JEP functions. For example:
=default() // Get the project default value =default(col('column')) // Get the value from the 'column', // but use the project default item for empty values
This would allow the batch importers to use project defaults with both new and existing items.
For background information see: http://www.mail-archive.com/basedb-users@lists.sourceforge.net/msg02048.html
Change History (4)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 13 years ago
Description: | modified (diff) |
---|
(In [5899]) Fixes #1642: Add support for column mapping that selects a project default item in batch item importers
Use
=default()
as column mapping to assign the project default value to all items, or=default(col('foo'))
to use the value from column 'foo' if it is not empty and the project default value otherwise.