Planfix API task.get: Difference between revisions

From Planfix
Jump to: navigation, search
(Created page with "{{#seo: |title=Planfix API task.get |titlemode=append |keywords=Planfix, API, task, get, api |description=Planfix API task.get }} A function for getting a task card. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="task.get"> <account></account> <sid></sid> <task> <id></id> <general></general> </task> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; width:100% " !width=...")
 
No edit summary
Line 199: Line 199:
|parent || || parent task ||  
|parent || || parent task ||  
|-
|-
|parent.id ||int ||идентификатор задачи, которая будет являться над задачей ||0 (ноль) - над задача отсутствует
|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 ||  
|-
|-
|template.id ||int ||идентификатор шаблона задачи||
|template.id ||int ||task template ID||
|-
|-
|project || || в рамках какого проекта поставлена задача ||
|project || || the project in which the task is located ||
|-
|-
|project.id ||int ||идентификатор проекта ||
|project.id ||int ||project identifier ||
|-
|-
|project.title || string || заголовок проекта ||
|project.title || string || project title ||
|-
|-
|client || || контрагент||  
|client || || counterparty||  
|-
|-
|client.id ||int ||идентификатор контрагента ||
|client.id ||int ||counterparty identifier ||
|-
|-
|client.name ||string || имя контрагента ||
|client.name ||string || counterparty name ||
|-
|-
|beginDateTime ||DateTime ||время создания задачи ||
|beginDateTime ||DateTime ||task creation time ||
|-
|-
|startTime ||DateTime || время начала работы || в интерфейсе ПланФикс поле ''приступить к работе''
|startTime ||DateTime || start time || the '''get started''' field in the Planfix interface
|-
|-
|endTime ||DateTime || время окончания задачи ||в интерфейсе ПланФикс поле ''закончить работу До''
|endTime ||DateTime || task end time ||the '''finish before''' field in the Planfix interface
|-
|-
|duration||int|| длительность задачи ||в интерфейсе ПланФикс поле ''Длительность''
|duration||int|| task duration ||the '''Duration''' field in the Planfix interface
|-
|-
|durationUnit||int || 0 - минуты, 1 - часы, 2 - дни ||
|durationUnit||int || 0 - minutes; 1 - hours; 2 - days ||
|-
|-
|general ||int ||сквозной номер ||
|general ||int || passthrough number ||
|-
|-
|isOverdued ||bool ||задача не выполнена в срок ||
|isOverdued ||bool ||task not completed on time ||
|-
|-
|isCloseToDeadline ||bool ||задача близка к дедлайну ||
|isCloseToDeadline ||bool ||task deadline is approaching ||
|-
|-
|isNotAcceptedInTime ||bool ||задача не принята вовремя||
|isNotAcceptedInTime ||bool ||task wasn't accepted in time||
|-
|-
|isSummary||bool ||задача суммарная||
|starred ||bool || located in favorites||
|-
|-
|starred ||bool || помещена в избранные||
|workers || || root element of the list of task assignees ||
|-
|-
|workers || ||корневой элемент списка исполнителей задачи ||
|workers.users || || root element of the list of users to whom the task is assigned ||
|-
|-
|workers.users || || корневой элемент списка пользователей, которым поставлена задача ||
|workers.users.user || node || user ||
|-
|-
|workers.users.user || node || пользователь ||
|workers.users.user.id ||int ||identifier of the user to whom the task is assigned ||
|-
|-
|workers.users.user.id ||int ||идентификатор пользователя, которому поставлена задача ||
|workers.users.user.name || string || user's name ||
|-
|-
|workers.users.user.name || string || имя пользователя  ||
|workers.groups || ||root element of the list of groups to whom the task is assigned ||
|-
|-
|workers.groups || ||корневой элемент списка групп, которым поставлена задача ||
|workers.groups.group || node || group ||
|-
|-
|workers.groups.group || node || группа ||
|workers.groups.group.id || int || group identifier||
|-
|-
|workers.groups.group.id || int || идентификатор группы||
|workers.groups.group.name || string|| group name||
|-
|-
|workers.groups.group.name || string|| название группы||
|members|| ||root element of the list of task participants; the same as the list of assignees ||
|-
|-
|members|| ||корневой элемент списка участников задачи, содержимое аналогично списку workers ||
|auditors || ||root element of the list of auditors participants; the same as the list of assignees ||
|-
|-
|auditors || ||корневой элемент списка аудиторов задачи, содержимое аналогично списку workers ||
|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 ||node ||задает периодичность выполнения задачи || смотри описание структуры узлов ''daily'', ''weekly'' и ''monthly'' ниже; отсутствие параметра, говорит о том что периодичность отсутствует
|periodicity.startDate || DateTime || task periodicity begins on this date ||
|-
|-
|periodicity.startDate || DateTime || начиная с этой даты начинает работать повторение задачи ||
|periodicity.endCondition || || conditions for ending periodicity ||
|-
|-
|periodicity.endCondition || || условия окончания повторения ||
|periodicity.endCondition.type ||enum || end condition || possible values: '''ENDLESS''' - no end date; '''BYCOUNT''' - after ''repeatCount'' recurrences; '''BYENDDATE''' - until a specified date
|-
|-
|periodicity.endCondition.type ||enum || условие окончания || допустимые значения: '''ENDLESS''' - нет конечной даты, '''BYCOUNT''' - После ''repeatCount '' повторений, '''BYENDDATE''' - до даты определенной в '''date'''
|periodicity.endCondition.date ||DateTime || date after which the task will stop repeating ||
used with type=BYENDDATE
|-
|-
|periodicity.endCondition.date ||DateTime || дата, после которой повторение задачи перестает работать || используется при type=BYENDDATE
|periodicity.endCondition.repeatCount || int||
number of recurrences after which the task will stop repeating || used with type=BYCOUNT
|-
|-
|periodicity.endCondition.repeatCount || int|| количество повторений, после которого задача перестает повторяться || используется при type=BYCOUNT
|periodicity.notify || ||notifications ||
|-
|-
|periodicity.notify || ||уведомления ||
|periodicity.notify.type ||int || type of period: 0 - workday, 1 - week ||
|-
|-
|periodicity.notify.type ||int || тип период, 0 - рабочий день, 1 - неделя ||
|periodicity.notify.day || int|| period length || if type=0 and day=2, notifications will be sent two workdays before the task starts
|-
|-
|periodicity.notify.day || int|| размер период || если type=0 и day=2, то уведомление прийдет за 2 рабочих дня до начала задачи
|customData || || values of task custom fields ||
|-
|-
|customData ||  ||значения пользовательских полей задачи ||
|customData.customValue.field.id ||  ||custom field identifier ||
|-
|-
|customData.customValue.field.id ||  ||идентификатор пользовательского поля ||
|customData.customValue.field.name||  ||custom field name ||
|-
|-
|customData.customValue.field.name||  ||название пользовательского поля ||
|customData.customValue.value ||  || custom field value||
|-
|-
|customData.customValue.value ||  ||значение пользовательского поля ||
|customData.customValue.text ||  || text value of the custom field ||
|-
|customData.customValue.text ||  ||текстовое значение пользовательского поля ||
|-
|-
|}
|}
Периодичность - не обязательный параметр. Внутри тега '''periodicity''' может быть только один из перечисленных элементов: ''daily'', ''weekly'', ''monthly''.
Periodicity is not a required parameter. There can be only one of the listed elements within the '''periodicity''' tag: ''daily, weekly, monthly.''


=== описание параметра periodicity ===
 
Описание параметра ''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:
{| class="wikitable" style="margin-top: 1em; width:100% "
{| class="wikitable" style="margin-top: 1em; width:100% "
!width="150"|Название !!width="200"| Тип !!width="50%"| Значение !! Примечание
!width="150"|Name !!width="200"| Type !!width="50%"| Value !! Notes
|-
|-
|type ||enum||определяет периодичность || допустимые значения EVERY или EVERY_WORKING, или AFTER_COMPLETE
|type ||enum||determines frequency || possible values are EVERY, EVERY_WORKING, and AFTER_COMPLETE
|-
|-
|shift || int||определяет сдвиг в днях || используется только при значениях type равным  EVERY или AFTER_COMPLETE
|shift || int||defines the offset in days || used only when type equals EVERY or AFTER_COMPLETE
|-
|-
|}
|}
Значение EVERY интерпретируется как каждый N-й день, заданный в параметре '''shift'''. EVERY_WORKING - каждый рабочий день.  Значение AFTER_COMPLETE интерпретируется как ставить новую задачу через N-й день после каждого завершения, заданный в параметре '''shift'''.


Описание параметра ''weekly'', параметры ''daily'' и ''monthly'' в этом случае не могут быть заданы. Указывает что задача должна повторяться еженедельно, согласно установленным критериям:
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:
{| class="wikitable" style="margin-top: 1em; width:100% "
{| class="wikitable" style="margin-top: 1em; width:100% "
!width="150"|Название !!width="200"| Тип !!width="50%"| Значение !! Примечание
!width="150"|Name !!width="200"| Type !!width="50%"| Value !! Notes
|-
|-
|type ||enum || определяет периодичность || допустимые значения EVERY или AFTER_COMPLETE
|type ||enum || determines frequency || possible values are EVERY and AFTER_COMPLETE
|-
|-
|shift ||int || сдвиг в неделях||  
|shift ||int || offset in weeks||  
|-
|-
|days ||set/list || перечень дней недели, разделитель символ запятой (,). понедельник имеет индекс 1, воскресение - 7. || используется только при type=EVERY  
|days ||set/list ||list of days of the week, separated by commas (,). Monday - 1, Sunday = 7. || used only when type=EVERY
|-
|-
|}
|}
Значение AFTER_COMPLETE интерпретируется как: ставить задачу через N-й неделю после каждого завершения, заданную в параметре '''shift'''.


Описание параметра ''monthly'', параметры ''daily'' и ''weekly'' в этом случае не могут быть заданы. Указывает что задача должна повторяться ежемесяно, согласно установленным критериям:
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:
{| class="wikitable" style="margin-top: 1em; width:100% "
{| class="wikitable" style="margin-top: 1em; width:100% "
!width="150"|Название !!width="200"| Тип !!width="50%"| Значение !! Примечание
!width="150"|Name !!width="200"| Type !!width="50%"| Value !! Notes
|-
|-
|type ||enum || периодичность || допустимые значения AFTER_COMPLETE или EVERY, или EXACT
|type ||enum || periodicity || possible values are AFTER_COMPLETE, EVERY, and EXACT
|-
|-
|month ||int ||задает месяц в/через который должно действие/задача повторяться ||
|month ||int ||specifies the months in/after which the action/task should repeat ||
|-
|-
|day ||int ||задает день в/через который должна задача повторяться || не используется при type=AFTER_COMPLETE
|day ||int ||sets the days in/after which the task should repeat || not used with type=AFTER_COMPLETE
|-
|-
|dayType ||enum || определяет тип дня || используется при type=EXACT. Допустимые значения смотри в разделе [[ПланФикс API:Тип дня для повторяющейся задачи|тип дня для повторяющейся задачи]]
|dayType ||enum || defines day type || used with type=EXACT. used with type=EXACT. See [[Planfix API:day types for recurring tasks|day types for recurring tasks]] for possible values
|-
|-
|}
|}
EXACT - ежемесячно в '''day''' день '''dayType''' каждого '''month''' месяца;<br>
EXACT - repeat on the dayType number day, every month month(s);<br>
EVERY - ежемесячно повторять '''day''' числа каждого '''month''' месяца;<br>
EVERY - repeat on day day of the month, every month month(s);<br>
AFTER_COMPLETE - ежемесячно ставить новую задачу через '''month''' месяц после каждого завершения.<br>
AFTER_COMPLETE - set a new task every month month(s) after a task is completed.<br>


В противном случае будет возвращен ответ с ошибкой:
Otherwise, an error response will be returned:
<source lang="xml">
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
Line 341: Line 346:
</response>
</response>
</source>
</source>


== Перейти ==
== Перейти ==
*[[ПланФикс API:Задачи]]
*[[Planfix API:Tasks]]
*[[Коды ошибок]]
*[[Error codes]]
*[[Список функций]]
*[[List of functions]]

Revision as of 13:01, 10 August 2023

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 priority section task priority
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>


Перейти