Struct TaskBase

Source
pub struct TaskBase {
Show 28 fields pub task_compact: TaskCompact, pub actual_time_minutes: Option<f64>, pub approval_status: Option<String>, pub assignee_status: Option<String>, pub completed: Option<bool>, pub completed_at: Option<DateTime<Utc>>, pub completed_by: Option<Value>, pub created_at: Option<DateTime<Utc>>, pub dependencies: Option<Vec<AsanaResource>>, pub dependents: Option<Vec<AsanaResource>>, pub due_at: Option<DateTime<Utc>>, pub due_on: Option<NaiveDate>, pub external: Option<Value>, pub hearted: Option<bool>, pub hearts: Option<Vec<Like>>, pub html_notes: Option<String>, pub is_rendered_as_separator: Option<bool>, pub liked: Option<bool>, pub likes: Option<Vec<Like>>, pub memberships: Option<Vec<Value>>, pub modified_at: Option<DateTime<Utc>>, pub name: Option<String>, pub notes: Option<String>, pub num_hearts: Option<i64>, pub num_likes: Option<i64>, pub num_subtasks: Option<i64>, pub start_at: Option<DateTime<Utc>>, pub start_on: Option<NaiveDate>,
}

Fields§

§task_compact: TaskCompact§actual_time_minutes: Option<f64>

This value represents the sum of all the Time Tracking entries in the Actual Time field on a given Task. It is represented as a nullable long value.

§approval_status: Option<String>

Conditional Reflects the approval status of this task. This field is kept in sync with completed, meaning pending translates to false while approved, rejected, and changes_requested translate to true. If you set completed to true, this field will be set to approved.

§assignee_status: Option<String>

Deprecated Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to “inbox” or “upcoming” inserts it at the top of the section, while the other options will insert at the bottom.

§completed: Option<bool>

True if the task is currently marked complete, false if not.

§completed_at: Option<DateTime<Utc>>

The time at which this task was completed, or null if the task is incomplete.

§completed_by: Option<Value>§created_at: Option<DateTime<Utc>>

The time at which this resource was created.

§dependencies: Option<Vec<AsanaResource>>

Opt In. Array of resources referencing tasks that this task depends on. The objects contain only the gid of the dependency.

§dependents: Option<Vec<AsanaResource>>

Opt In. Array of resources referencing tasks that depend on this task. The objects contain only the ID of the dependent.

§due_at: Option<DateTime<Utc>>

The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.

§due_on: Option<NaiveDate>

The localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at.

§external: Option<Value>

OAuth Required. Conditional. This field is returned only if external values are set or included by using [Opt In] (/docs/inputoutput-options). The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.

§hearted: Option<bool>

Deprecated - please use liked instead True if the task is hearted by the authorized user, false if not.

§hearts: Option<Vec<Like>>

Deprecated - please use likes instead Array of likes for users who have hearted this task.

§html_notes: Option<String>

Opt In. The notes of the text with formatting as HTML.

§is_rendered_as_separator: Option<bool>

Opt In. In some contexts tasks can be rendered as a visual separator; for instance, subtasks can appear similar to sections without being true section objects. If a task object is rendered this way in any context it will have the property is_rendered_as_separator set to true.

§liked: Option<bool>

True if the task is liked by the authorized user, false if not.

§likes: Option<Vec<Like>>

Array of likes for users who have liked this task.

§memberships: Option<Vec<Value>>

Create-only. Array of projects this task is associated with and the section it is in. At task creation time, this array can be used to add the task to specific sections. After task creation, these associations can be modified using the addProject and removeProject endpoints. Note that over time, more types of memberships may be added to this property.

§modified_at: Option<DateTime<Utc>>

The time at which this task was last modified.

The following conditions will change modified_at:

  • story is created on a task
  • story is trashed on a task
  • attachment is trashed on a task
  • task is assigned or unassigned
  • custom field value is changed
  • the task itself is trashed
  • Or if any of the following fields are updated:
    • completed
    • name
    • due_date
    • description
    • attachments
    • items
    • schedule_status

The following conditions will not change modified_at:

  • moving to a new container (project, portfolio, etc)
  • comments being added to the task (but the stories they generate will affect modified_at)
§name: Option<String>

Name of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.

§notes: Option<String>

Free-form textual information associated with the task (i.e. its description).

§num_hearts: Option<i64>

Deprecated - please use likes instead The number of users who have hearted this task.

§num_likes: Option<i64>

The number of users who have liked this task.

§num_subtasks: Option<i64>

Opt In. The number of subtasks on this task.

§start_at: Option<DateTime<Utc>>

Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on. Note: due_at must be present in the request when setting or unsetting the start_at parameter.

§start_on: Option<NaiveDate>

The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter.

Trait Implementations§

Source§

impl Clone for TaskBase

Source§

fn clone(&self) -> TaskBase

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TaskBase

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TaskBase

Source§

fn default() -> TaskBase

Returns the “default value” for a type. Read more
Source§

impl Deref for TaskBase

Source§

type Target = TaskCompact

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for TaskBase

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'de> Deserialize<'de> for TaskBase

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for TaskBase

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Serialize for TaskBase

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,