Hey everyone, we have a new feature to announce! It’s less of a feature, though, and more of a plethora of new fields on stories. A while back, we added the resource_subtype
fields in our API to objects like tasks and custom fields. Stories also got this treatment, which some of you may have noticed, but we decided to take it a step further. Instead of just providing the subtype of the story, we now also provide a bunch of extra relevant data as new, structured fields!
Here’s an example of a “due date changed” story in the API before:
{
"id" : 1110484817449237,
"gid" : "1110484817449237",
"created_at" : "2019-02-19T21:59:21.704Z",
"created_by" : { ... },
"resource_type" : "story",
"target" : { ... },
"text" : "changed the due date to February 21", // Ew, nobody wants this
"type" : "system" // Not helpful in the slightest
}
If you wanted to know that this story means that someone changed a due date, you’d have to parse the text
field. If you wanted to know what the due date was set to, you’d also have to parse the text
field and have to infer what year is supposed to be. If you wanted to know the old due date, well… you’d be out of luck.
With the new fields we’ve added, this story will now look like a lot better:
{
"id" : 1110484817449237,
"gid" : "1110484817449237",
"created_at" : "2019-02-19T21:59:21.704Z",
"created_by" : { ... },
"resource_type" : "story",
"resource_subtype" : "due_date_changed" // Unambiguous!
"target" : { ... },
"text" : "changed the due date to February 21", // You don't have to touch this!
"new_dates" : {
"due_on" : "2019-02-21", // A standard format!
"due_at" : null,
"start_on" : null
},
"old_dates" : {
"due_on" : "2019-02-15", // Information you didn't have before!
"due_at" : null,
"start_on" : null
}
}
There are over 30 different subtypes of stories, and below you’ll find a comprehensive list of what they are, what they mean (if it’s not immediately obvious), and what extra fields they have on them. The outer-most level of the list below is the subtype of story, and the bullets beneath that are the fields it has. Note that (with the exception of resource_subtype
) these new fields are not included by default on stories, and you’ll need to use opt_fields
to select them. Special thanks to @Sasha_S and @Kevin_Quicho for doing the heavy lifting on this project!
Basic changes
name_changed
old_name
andnew_name
notes_changed
- the task description was changeddue_date_changed
old_dates
andnew_dates
- objects with the old/new values, containing:start_on
due_on
due_at
marked_today
- the assignee marked this task for todaymarked_complete
marked_incomplete
resource_subtype_changed
- used when a task is converted to a milestone or vice versaold_resource_subtype
andnew_resource_subtype
- the old and new subtypes
Comments and likes
liked
comment_added
comment_liked
story
- the comment story that was liked
attachment_added
attachment
- the attachment that was added
attachment_liked
attachment
- the attachment that was liked
completion_liked
story
- the completion story that was liked
People
assigned
assignee
- the new assignee
unassigned
collaborator_added
collaborator
- the user that was added as a collaborator
Moving and reorganization
section_changed
old_section
andnew_section
- the section the task was moved into (either may benull
)
added_to_task
andremoved_from_task
- this task was added/removed as a subtask of another tasktask
- the task that this one was added to/removed from
added_to_project
andremoved_from_project
project
- the project this task was added to/removed from
added_to_tag
andremoved_from_tag
tag
- the tag it was added to/removed from
Custom fields
text_custom_field_changed
old_text_value
andnew_text_value
- the old and new text values
number_custom_field_changed
old_number_value
andnew_number_value
- the old and new number values
enum_custom_field_changed
old_enum_value
andnew_enum_value
- the old and new enum options
Stories of these subtypes also include a custom_field
field on them pointing to the relevant custom field.
Duplicates
duplicate_merged
- another task was merged into this task as a duplicateduplicate_of
- the task that was closed and merged into this one
marked_duplicate
- this task was merged into another task as a duplicateduplicate_of
- the task that this one was merged into
duplicate_unmerged
- a task that was previously merged into this one was unmergedduplicate_of
- the task that was unmerged
unmarked_duplicate
- this task was marked as not a duplicateduplicated
- this task was duplicated from another taskduplicated_from
- the source of this task
Dependencies
dependency_added
anddependency_removed
dependency
- the task that this one depends on
dependent_added
anddependent_removed
dependent
- the task that depends on this one
dependency_marked_complete
anddependency_marked_incomplete
dependency
- the dependency that was marked complete/incomplete
dependency_due_date_changed
dependency
- the dependency that had its due date changednew_dates
- the new dates on the dependency
all_dependencies_marked_complete
Notifications
starting_today
- this task is starting todaydue_today
- this task is due today
Let us know what you think about these new fields! And as always, let us know if you have any questions. We’ll update this post to reflect any clarifications we need to make as developers respond to this thread.