Planfix API task.get: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
Line 271: Line 271:
|-
|-
|periodicity.endCondition.repeatCount || int||
|periodicity.endCondition.repeatCount || int||
number of recurrences after which the task will stop repeating || used with type=BYCOUNT
number of recurrences after which the task will stop repeating ||  
used with type=BYCOUNT
|-
|-
|periodicity.notify || ||notifications ||
|periodicity.notify || ||notifications ||

Revision as of 12:12, 12 December 2024

A function for getting a task card. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="task.get">
  <account></account>
  <sid></sid>
  <task>
    <id></id>
    <general></general>
  </task>
  <signature></signature>
</request>
Name Type Value Notes
task.id int ID of the task that you would like to receive information about
general int task number (if given, used instead of ID)
signature string(32) request signature


Result of successful execution:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <account></account>
  <sid></sid>
  <task>
    <id></id>
    <title></title>
    <description></description>
    <importance></importance>
    <status></status>
    <checkResult></checkResult>
    <type></type>
    <owner>
      <id></id>
      <name></name>
    </owner>
    <parent>
      <id></id>
    </parent>
    <template>
      <id></id>
    </template>
    <project>
      <id></id>
      <title></title>
    </project>
    <client>
      <id></id>
      <name></name>
    </client>
    <beginDateTime></beginDateTime>
    <startTime></startTime>
    <endTime></endTime>
    <duration></duration>
    <durationUnit></durationUnit>

    <general></general>
 
    <isOverdued></isOverdued>
    <isCloseToDeadline></isCloseToDeadline>
    <isNotAcceptedInTime></isNotAcceptedInTime>
    <isSummary></isSummary>
    <starred></starred>


    <workers>
      <users>
        <user>
          <id></id>
          <name></name>
        </user>
        <!-- ... -->
      </users>
      <groups>
        <group>
          <id></id>
          <name></name>
        </group>
        <!-- ... -->
      </groups>
    </workers>
    <members>
      <users>
        <user>
          <id></id>
          <name></name>
        </user>
        <!-- ... -->
      </users>
      <groups>
        <group>
          <id></id>
          <name></name>
        </group>
        <!-- ... -->
      </groups>
    </members>
    <auditors>
      <users>
        <user>
          <id></id>
          <name></name>
        </user>
        <!-- ... -->
      </users>
      <groups>
        <group>
          <id></id>
          <name></name>
        </group>
        <!-- ... -->
      </groups>
    </auditors>
    <periodicity>
      <!-- ежедневно -->
      <daily>
        <type></type>
        <shift></shift>
      </daily>
      <!-- еженедельно -->
      <weekly>
        <type></type>
        <shift></shift>
        <days></days>
      </weekly>
      <!-- ежемесячно -->
      <monthly>
        <type></type>
        <month></month>
        <day></day>
        <dayType></dayType>
      </monthly>

      <startDate></startDate>
      <endCondition>
        <type></type>
        <date></date>
        <repeatCount></repeatCount>
      </endCondition>
      <notify>
        <type></type>
        <day></day>
      </notify>
    </periodicity>
    <customData>
      <customValue>
        <field>
          <id></id>
          <name></name>
        </field>
        <value></value>
        <text></text>
      </customValue>
      <customValue>
        <!-- ... -->
      </customValue>
      <!-- ... -->
    </customData>
  </task>
  <signature></signature>
</response>
Name Type Value Notes
id int task ID
title string task name
description string what the task is about; description
importance enum priority for a list of valid values, see the task priority section task priority
status enum task status for a list of valid values, see the task statuses section
statusSet int task process identifier
checkResult bool whether or not the task has mandatory result checking
owner task creator
owner.id int user identifier
owner.name string user's name
parent parent task
parent.id int identifier of the task that will be the parent task 0 (zero) means that there is no parent task
template template
template.id int task template ID
project the project in which the task is located
project.id int project identifier
project.title string project title
client counterparty
client.id int counterparty identifier
client.name string counterparty name
beginDateTime DateTime task creation time
startTime DateTime start time the get started field in the Planfix interface
endTime DateTime task end time the finish before field in the Planfix interface
duration int task duration the Duration field in the Planfix interface
durationUnit int 0 - minutes; 1 - hours; 2 - days
general int passthrough number
isOverdued bool task not completed on time
isCloseToDeadline bool task deadline is approaching
isNotAcceptedInTime bool task wasn't accepted in time
starred bool located in favorites
workers root element of the list of task assignees
workers.users root element of the list of users to whom the task is assigned
workers.users.user node user
workers.users.user.id int identifier of the user to whom the task is assigned
workers.users.user.name string user's name
workers.groups root element of the list of groups to whom the task is assigned
workers.groups.group node group
workers.groups.group.id int group identifier
workers.groups.group.name string group name
members root element of the list of task participants; the same as the list of assignees
auditors root element of the list of auditors participants; the same as the list of assignees
periodicity node sets the task's periodicity (recurrence) see descriptions daily, weekly, and monthly below; omitting this parameter indicates that there is no task recurrence
periodicity.startDate DateTime task periodicity begins on this date
periodicity.endCondition conditions for ending periodicity
periodicity.endCondition.type enum end condition possible values: ENDLESS - no end date; BYCOUNT - after repeatCount recurrences; BYENDDATE - until a specified date
periodicity.endCondition.date DateTime date after which the task will stop repeating

used with type=BYENDDATE

periodicity.endCondition.repeatCount int

number of recurrences after which the task will stop repeating || used with type=BYCOUNT

periodicity.notify notifications
periodicity.notify.type int type of period: 0 - workday, 1 - week
periodicity.notify.day int period length if type=0 and day=2, notifications will be sent two workdays before the task starts
customData values of task custom fields
customData.customValue.field.id custom field identifier
customData.customValue.field.name custom field name
customData.customValue.value custom field value
customData.customValue.text text value of the custom field


Periodicity is not a required parameter. There can be only one of the listed elements within the periodicity tag: daily, weekly, monthly.


description of periodicity parameter

Description of the daily parameter; in this instance, descriptions cannot be given for weekly or monthly. Specifies that the task should repeat daily using the established criteria:

Name Type Value Notes
type enum determines frequency possible values are EVERY, EVERY_WORKING, and AFTER_COMPLETE
shift int defines the offset in days used only when type equals EVERY or AFTER_COMPLETE


EVERY sets a new task every nth day, with n specified in the shift parameter. EVERY_WORKING - every working day.

AFTER_COMPLETE sets a new task every nth day after each completion, with n specified in the shift parameter.

Description of the weekly parameter; in this instance, descriptions cannot be given for daily or monthly. Specifies that the task should repeat weekly using the established criteria:

Name Type Value Notes
type enum determines frequency possible values are EVERY and AFTER_COMPLETE
shift int offset in weeks
days set/list list of days of the week, separated by commas (,). Monday - 1, Sunday = 7. used only when type=EVERY


AFTER_COMPLETE sets a new task every nth week after each completion, with n specified in the shift parameter.

Description of the monthly parameter; in this instance, descriptions cannot be given for daily or weekly. Indicates that the task should repeat monthly, using the established criteria:

Name Type Value Notes
type enum periodicity possible values are AFTER_COMPLETE, EVERY, and EXACT
month int specifies the months in/after which the action/task should repeat
day int sets the days in/after which the task should repeat not used with type=AFTER_COMPLETE
dayType enum defines day type used with type=EXACT. used with type=EXACT. See day types for recurring tasks for possible values


EXACT - repeat on the dayType number day, every month month(s);
EVERY - repeat on day day of the month, every month month(s);
AFTER_COMPLETE - set a new task every month month(s) after a task is completed.

Otherwise, an error response will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To