Import Tasks
Overview
It is possible to import tasks, addresses, journal entries, or any
other type of object into the diary from other data
sources. To do this you need to:
- Get the data into a table form as a CSV file (this could be
from a spreadsheet or database).
- Make sure the first row in the CSV file has the same names as
the variables in the objects they will be copied to (see Object Specs).
- Run the import function, and select how these objects will be
brought in.
Dialog Options
To get to the import function, select File
-> Import -> Entries. This opens
the Import dialog.
The import dialog has these fields:
- Template: Use the drop-down to pick a
template for an Import that you have saved before.
When you select it a saved template, it will populate all of the
rest of the fields in the form. Creating a saved
template is done using the Save button.
- Filename: The name of the CSV file to
import. Press the ">" button to browse for the
file.
- Import To: When you import, you can choose between
putting any new tasks at the top level of the diary tree, or
putting them under the entry that was selected when you started
the import. When the application reads the CSV file,
and can't find a matching entry, then it will create new entries
in this location.
- Type to Create: Lets you specify what type of entry to
create if the application can't find an existing entry to
update. What type of entry you create will depend on
where you are importing to (see the Import To field) - To find
this out, see what type of child entry you are allowed to create
below the entry you selected.
- Update Existing Fields: This lets you decide
whether to update fields in an entry that already exists in the
diary. If you un-tick this box, then the import
function will only import missing entries, but not update
existing ones.
- Update Task Details: This lets you update the
details field for an entry. If you routinely add
information to the Details field, then it is best to leave this
un-ticked.
- Update Remaining Time: If you might have worked
on a task, and updated the remaining time (and you have more
accurate information than the import), then you can stop the
import from updating some remaining time values. If
you leave this un-ticked, then it will only update the remaining
time if no time has been spent on the task, and the percentage
complete is zero.
- Close Tasks Before Import: This lets you
close all tasks that match "Type to Create". You
might want to do this if something has been deleted between this
and the last import, and you want JXCirrus to close that
task. The application is a bit choosy though:
It won't close anything that has had time spent on it, or is
partly complete.
- Clear Time Spent Before Import: If you are
relying on the import for time-spent records, then tick this
box. That will remove ALL time spent records below
the "Import To" task before importing. Be very very
sure you want to do this! It is possible to clear the time spent
for a single task by specifying a time session with a duration
of < 0 (see below).
- Save Button: This lets you save all of the fields
on this form into a template that you can re-use. To
save, type the name to save to into the Template field, then
press Save. You can re-use the template by selecting
the saved name in the template drop-down.
- Cancel Button: Quits without importing.
- OK Button: Starts the import process.
Importing to iOS
iOS is a little more tricky to import to, as you cannot browse
around the file system of your phone (you can only wander around
your apps data area).
To make a CSV file available to the app, you will need to use the
"Files" app on your iPhone/iPad.
- Open the Files app.
- Locate the file you want to import.
- Hold down on that file, and select Copy.
- Go to Browse, then On My Phone.
- Select JXCirrusDiary.
- Hold down on the empty folder, and select Paste from the menu.
The CSV File
The CSV file that you import from needs to be structured in a very
particular way to be able to import into this application.
- The first row much contain the names of the fields that you
are going to import to. These names need to match
either:
- A system variable (see System Variables in the Object Specs guide or use the
table under Modifying Entries in the Scripts guide.).
- A variable that you have specified using an Object Spec.
- The first column must contain an ID that can be used to search
for that entry in the diary.
- If you want to set the parent at import (rather than having
them all arrive in the same location) - Add the column title
"ObjectParent".
- The value in the ObjectParent column should match a value in
the first column in the CSV file.
- If you want to set the object spec at import - Add the column
title "ObjectSpec".
- This will set the object spec of the new entry (or existing
entries) to the value in the ObjectSpec column.
Key
|
ObjectParent
|
ObjectSpec
|
KEY-100
|
|
Task
|
KEY-200
|
|
Appointment
|
KEY-300
|
KEY-200
|
Task
|
In this example, after import:
- KEY-300 will be a sub-task of KEY-200
- KEY-200 will be an appointment.
A few important notes:
- Any fields that refer to time default to hours (for example
1.5 means one and a half hours). If you want to
specify the time in seconds, add the word "seconds" after (i.e.
"5400 seconds").
- In JXCirrus Project, using Resource as a column will set the
resource for that task/entry. If the resource
doesn't already exist then the application will create it.
- To add spent time, you need 2 columns: One called "Spent"
which contains the number of hours spent on a session, and
"SpentDate", which contains the date that "Spent" time should
start at. If you have lots of different spent times,
just repeat the lines in the spreadsheet with different
"SpentDate" values.
Sounds complex - It is much easier with an example...
An Example - Importing from Jira
OK - Imagine we want to import a full set of tasks from the task
management system, Jira.
This is the sort of spreadsheet we might get out of a Jira query:
Displaying 300 issues
at 6/Jun/16
|
Key
|
Summary
|
Assignee
|
ETC
|
Cost Centre
|
Target Effort
|
TASK-1200
|
Some random task
|
Joe Stubbs
|
3600
|
ABC123
|
7200
|
Of course, your Jira will almost certainly look
different... But for reference, ETC is the remaining
effort, and Target Effort is the total time for a task.
If we make a new spreadsheet, we could paste the Jira dump into
Sheet1. Sheet2 might look like this:
JiraID
|
Title
|
Duration
|
Remaining
|
CostCentre
|
Resource
|
=Sheet1!A3
|
=Sheet1!B3
|
=Sheet1!F3/3600
|
=Sheet1!F3/3600
|
=Sheet1!E3
|
=Sheet1!C3
|
=Sheet1!A4
|
=Sheet1!B4
|
=Sheet1!F4/3600
|
=Sheet1!F4/3600
|
=Sheet1!E4
|
=Sheet1!C4
|
We can now import into an Object Spec like this:
$<EntryType> = eval("Task");
$<JiraID> = prompt;
$<CostCentre> = prompt;
It will match the "Key" field with an entry in the Diary Database
with a matching JiraID. If it cannot find that JiraID,
then it will create a new entry.
If you save the spreadsheet out as a CSV file, you should be able to
import it using the import function.
If you are importing time spent then there are some additional
fields that you can use:
Field
|
Meaning
|
SpentDate
|
The date that the time was spent.
|
SpentResource
|
The name of the person who spent the time (if
not specified the time defaults to the person the task is
assigned to).
|
Spent
|
The amount of time that was spent - i.e. 2.5
means 2 hours 30 mins or 1800S means 1800 seconds. NOTE: If
you specify a number < 0 here, then that is a signal to
clear all recorded time for that task. This can be used to
pre-clear the entries for the task.
|
Your input spreadsheet might look like this:
Key
|
SpentResource
|
SpentDate
|
Spent
|
TASK-1200
|
Joe Stubbs
|
14-Jul-2015
|
10
|
Your mapped spreadsheet would look like this:
JiraID
|
SpentResource |
SpentDate
|
Spent |
=Sheet1!A2 |
=Sheet1!B2
|
=Sheet1!C2
|
=Sheet1!D2
|