Import Definitions
Version: Ellie 2023.11
Import Definition Example
Import definitions are configured in xml format. Example:
tasks_import_csv
<?xml version="1.0" encoding="UTF-8"?>
<config>
<name>tasks_import_csv</name>
<model>Tasks_Model_Task</model>
<plugin>Tasks_Import_Csv</plugin>
<type>import</type>
<headline>1</headline>
<dryrun>0</dryrun>
<delimiter>,</delimiter>
<description>Import CSV formatted tasks</description>
<example>Tasks/Import/examples/checklist.csv</example>
<extension>csv</extension>
<mapping>
<field>
<source>summary</source>
<destination>summary</destination>
</field>
<field>
<source>due</source>
<destination>due</destination>
</field>
<field>
<source>priority</source>
<destination>priority</destination>
</field>
<field>
<source>description</source>
<destination>description</destination>
</field>
<field>
<source>percent</source>
<destination>percent</destination>
</field>
<field>
<source>status</source>
<!-- IN-PROCESS, COMPLETED -->
<destination>status</destination>
</field>
<field>
<source>completed</source>
<destination>completed</destination>
</field>
<field>
<source>alarm_minutes_before</source>
<destination>alarm_minutes_before</destination>
</field>
</mapping>
</config>
Import Alarms
<field>
<source>alarm_minutes_before</source>
<destination>alarm_minutes_before</destination>
</field>
=> creates an alarm with X minutes before.
Import DateTime fields
tine imports support the php strtotime formats:
echo strtotime("now"), "\n";
echo strtotime("10 September 2000"), "\n";
echo strtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime("next Thursday"), "\n";
echo strtotime("last Monday"), "\n";
It's also possible to define a special date/time format pattern:
<field>
<source>Anschaffung</source>
<destination>added_date</destination>
<typecast>datetime</typecast>
<datetime_pattern>!Y-m-d</datetime_pattern>
</field>