Project Templates are sets of tasks and attributes that can be applied to new or existing projects. A single template can be used on any number of projects. A project template's tasks are all stored in an attribute located on the project template object called raw_json. It is a JSON hash of all the stories that has been turned into a string and is stored on the object.
A project template's tasks are all stored in an attribute located on the project template object called raw_json. It is a JSON hash of all the stories that has been turned into a string and is stored on the object.
Stories within the JSON have the following attributes:
title- The title of the task.billable- The title of the project template.relative_start_date- An integer that represents the start day of the task relative to the start of the project.relative_due_date- An integer that represents the end day of the task relative to the start of the project.duration- The number of days the task will take to complete.temp_id- The unique reference ID for the task (used for dependencies).description- The task description.budget_estimate_in_cents- An integer (whole number) that represents the budget estimate, in cents, for the task.time_estimate_in_minutes- An integer (whole number) that represents the time estimate, in minutes, for the task.sub_stories- An nested array of sub-tasks that have the same structure as tasks.checklist- An array of strings, each being a checklist item on the task. For example, "checklist":["item one", "item two"].tag_list- A string with tags that are comma separated. For example, "design, engineering, this has spaces." This creates three tags: "design", "engineering", and "this has spaces."assignments- An array of objects with key value pairs "assignee_id":id. For example, [{"assignee_id":100},{"assignee_id":101}] This task would have two resources assigned to it. These are the IDs of two associated project template assignments. Project template assignments are associated objects.dependencies- An array of objects that represent a task's dependencies. A dependency is an object that connects two tasks, and is used in Gantt charts. A dependency object lives in the dependencies array on it's source task, not it's target.
Dependencies have the following attributes:
source_id- The temporary ID of the first task (source task) in the dependency.target_id- The temporary ID of the second task (target task) in the dependency.type- There are four types of dependencies, numbered zero through three.- 0 - From the beginning of the source task to the beginning of the target task.
- 1 - From the beginning of the source task to the end of the target task.
- 2 - From the end of the source task to beginning of the target task.
- 3 - From the end of the source task to end of the target task.
lag- An integer that represents the number of days delay that occurs between the two tasks in the dependency.
raw_json example:
[
{
"story_type":"task",
"billable":true,
"relative_start_date":1,
"relative_due_date":2,
"title":"Task One",
"temp_id":1,
"dependencies":[{"source_id":1, "target_id":2, "type":2, "lag":0}],
"description":"this is a task",
"assignments":[{"assignee_id":"26"}],
"tag_list":"difficult,easy",
"budget_estimate_in_cents":40000,
"time_estimate_in_minutes":1200,
"sub_stories": [
{
"story_type":"task",
"billable":true,
"due_date":nil,
"start_date":nil,
"relative_start_date":1,
"relative_due_date":3,
"title":"Sub Task One",
"description":"this is a sub task",
"assignments":[{"assignee_id":"27"}],
"budget_estimate_in_cents":20000,
"time_estimate_in_minutes":300,
"temp_id":3
}
]
},
{
"story_type":"deliverable",
"billable":true,
"endDay":4,
"relative_start_date":1,
"relative_due_date":4,
"title":"Deliverable One",
"temp_id":2,
"description":"this is a deliverable",
"sub_stories":[]
},
{
"story_type":"milestone",
"billable":true,
"title":"Milestone One",
"description":"this is a milestone",
"weight":100,
"duration":0,
"relative_start_date":5,
"sub_stories":[],
"checklist":["item one", "item two"],
"temp_id":4
}
]
```.