Questions from development team
  • Page:
  • 1
  • 2

TOPIC: Generating TRP files

Generating TRP files 15 years 5 months ago #1530

  • Signata
  • Signata's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hello, I am working on an XML generator which will take CSV files exported from OmniFocus, so I can rapidly migrate hundreds of projects and tasks into ThinkingRock. I have successfully built a template generator, that was easy to do, but am wishing for the greater degree of power and reduced data loss available in the exported project XML format. However there are a few things that I am unclear on.

First, there is an ID number supplied to each element in the schema, how important is this? Is it only important for these to be internally consistent? It seems kind of redundant, given that elements are already nested, but it would be pretty easy for me to generate IDs and handle this if necessary, but I don't want to blow anything up by using whatever numbers I like, or if there are some IDs I should avoid. I also noted that the <project> container references a parent id of 3, which is why I've inferred some are to be avoided, as that was exported at the root level.

Does TR just ignore IDs when importing, or do I need to conform to anything?

The language I'm using, Ruby, supplies epoch dates to the second, not millisecond, my testing shows it is perfectly safe to append three zeros to the end of a Ruby epoch date time. Let me know if that will cause issues.

How many of these elements are optional? For example, do I need to declare <brainstorming/> or can I just leave it out entirely?

Pretty much everything else is straight-forward.

Thanks for any help you can provide.
The administrator has disabled public write access.

Re:Generating TRP files 15 years 5 months ago #1535

  • Jeremy
  • Jeremy's Avatar
  • Offline
  • Administrator
  • Posts: 323
  • Thank you received: 6
  • Karma: 19
... there is an ID number supplied to each element in the schema, how important is this? Is it only important for these to be internally consistent ...

ID are used in the code and need to be there and internally consistent. They should be an integer greater than 100.
There are several fixed IDs you probably need to use:
/** The special ID number for the root project. */
    public static final int ID_ROOT_ALL = 0;
    /** The special ID number for the root project for projects. */
    public static final int ID_ROOT_PROJECTS = 1;
    /** The special ID number for the root project for single actions. */
    public static final int ID_ROOT_ACTIONS = 2;
    /** The special ID number for the root project for template projects. */
    public static final int ID_ROOT_TEMPLATES = 3;
    /** The special ID number for the root project for future projects. */
    public static final int ID_ROOT_FUTURES = 4;
    ...
    /** The special ID number for the default topic. */
    public static final int ID_DEFAULT_TOPIC = 8;
    /** The special ID number for the default context. */
    public static final int ID_DEFAULT_CONTEXT = 9;
Ruby, supplies epoch dates to the second, not millisecond
Not a problem.
How many of these elements are optional? For example, do I need to declare <brainstorming/> or can I just leave it out entirely?
I am pretty sure that leaving out elements is ok as long as you provide the manditory ones - which should normally be ID, description, parent ID (for projects and actions), topic, context. Probably just have to try it out.
Last Edit: 15 years 5 months ago by Jeremy.
The administrator has disabled public write access.

Re:Generating TRP files 15 years 5 months ago #1537

  • Signata
  • Signata's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Excellent, thanks for the information, this should be enough to get about 90% of data transferred, with most of the loss being OF's fault for not supplying recurrence info.

I think I'll increment the final millisecond integer by 1 just in case having a bunch of identical values causes havoc in the sorting engine. OmniFocus doesn't provide created-time stamps, so I'll have to generate those at script time, possibly causing hundreds of actions to have nearly identical created time stamps.

And my testing thus far in omitting empty elements looks good. If I leave out the topic, for instance, it gets supplied with "None" instead of being blank and indicative of weirdness.
The administrator has disabled public write access.

Re:Generating TRP files 15 years 5 months ago #1557

  • Signata
  • Signata's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
I am running into an issue with delegation. I have reproduced the syntax precisely:
<state type="DELEGATED">
    <delegate>Somebody</delegate>
</state>

But when importing the project, the delegation assignment always comes up empty, as if the drop-down was never selected from. I have created a correct example in TR, exported the project, and then re-imported it, and note that it is doing the same thing with a TR generated XML file, too. It appears that there is a problem with TR’s import feature in correctly setting this field.

That detail aside, everything else has gone well.
The administrator has disabled public write access.

Re:Generating TRP files 15 years 5 months ago #1563

  • Jeremy
  • Jeremy's Avatar
  • Offline
  • Administrator
  • Posts: 323
  • Thank you received: 6
  • Karma: 19
I have just released an update of the projects module to fix this. After installing, you should be able to use the delegate ID (AKA actor ID) or the delegate's name. If there is an ID and there is a delegate in the list with that ID it will assign to that delegate. Otherwise, it will try to find the delegate in the list by matching the delegate name, failing that it will just set the name as a free entry delegate (i.e. not in the list of delegates).
e.g.
<state type="DELEGATED">
    <delegate>Somebody</delegate>
</state>

<state type="DELEGATED">
    <delegate-id>1234</delegate-id>
    <delegate>Somebody</delegate>
</state>
Last Edit: 15 years 5 months ago by Jeremy.
The administrator has disabled public write access.

Re:Generating TRP files 15 years 5 months ago #1577

  • Signata
  • Signata's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Fantastic; grabbed the module updates and got it working without any modification to the scripts. Thanks for the fast fix!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: claire
Time to create page: 0.399 seconds

About ThinkingRock

ThinkingRock is developed by Avente Pty Ltd, an Australian registered company.

ThinkingRock is not affiliated with or endorsed by the David Allen Company.

Getting Things Done® and GTD® are registered trademarks of the David Allen Company.

Read more about the ThinkingRock team in this interview on the Netbeans website

Get organized Links

We have compiled a list of useful resources if you want to get organized.

Get In Touch

This email address is being protected from spambots. You need JavaScript enabled to view it.

Cron Job Starts