Add date_started parameter to task API calls (#3042)
This commit is contained in:
@@ -89,7 +89,7 @@ class TaskProcedure extends BaseProcedure
|
|||||||
public function createTask($title, $project_id, $color_id = '', $column_id = 0, $owner_id = 0, $creator_id = 0,
|
public function createTask($title, $project_id, $color_id = '', $column_id = 0, $owner_id = 0, $creator_id = 0,
|
||||||
$date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = 0, $priority = 0,
|
$date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = 0, $priority = 0,
|
||||||
$recurrence_status = 0, $recurrence_trigger = 0, $recurrence_factor = 0, $recurrence_timeframe = 0,
|
$recurrence_status = 0, $recurrence_trigger = 0, $recurrence_factor = 0, $recurrence_timeframe = 0,
|
||||||
$recurrence_basedate = 0, $reference = '', array $tags = array())
|
$recurrence_basedate = 0, $reference = '', array $tags = array(), $date_started = '')
|
||||||
{
|
{
|
||||||
ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'createTask', $project_id);
|
ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'createTask', $project_id);
|
||||||
|
|
||||||
@@ -121,6 +121,7 @@ class TaskProcedure extends BaseProcedure
|
|||||||
'reference' => $reference,
|
'reference' => $reference,
|
||||||
'priority' => $priority,
|
'priority' => $priority,
|
||||||
'tags' => $tags,
|
'tags' => $tags,
|
||||||
|
'date_started' => $date_started,
|
||||||
);
|
);
|
||||||
|
|
||||||
list($valid, ) = $this->taskValidator->validateCreation($values);
|
list($valid, ) = $this->taskValidator->validateCreation($values);
|
||||||
@@ -131,7 +132,7 @@ class TaskProcedure extends BaseProcedure
|
|||||||
public function updateTask($id, $title = null, $color_id = null, $owner_id = null,
|
public function updateTask($id, $title = null, $color_id = null, $owner_id = null,
|
||||||
$date_due = null, $description = null, $category_id = null, $score = null, $priority = null,
|
$date_due = null, $description = null, $category_id = null, $score = null, $priority = null,
|
||||||
$recurrence_status = null, $recurrence_trigger = null, $recurrence_factor = null,
|
$recurrence_status = null, $recurrence_trigger = null, $recurrence_factor = null,
|
||||||
$recurrence_timeframe = null, $recurrence_basedate = null, $reference = null, $tags = null)
|
$recurrence_timeframe = null, $recurrence_basedate = null, $reference = null, $tags = null, $date_started = null)
|
||||||
{
|
{
|
||||||
TaskAuthorization::getInstance($this->container)->check($this->getClassName(), 'updateTask', $id);
|
TaskAuthorization::getInstance($this->container)->check($this->getClassName(), 'updateTask', $id);
|
||||||
$project_id = $this->taskFinderModel->getProjectId($id);
|
$project_id = $this->taskFinderModel->getProjectId($id);
|
||||||
@@ -161,6 +162,7 @@ class TaskProcedure extends BaseProcedure
|
|||||||
'reference' => $reference,
|
'reference' => $reference,
|
||||||
'priority' => $priority,
|
'priority' => $priority,
|
||||||
'tags' => $tags,
|
'tags' => $tags,
|
||||||
|
'date_started' => $date_started,
|
||||||
));
|
));
|
||||||
|
|
||||||
list($valid) = $this->taskValidator->validateApiModification($values);
|
list($valid) = $this->taskValidator->validateApiModification($values);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ API Task Procedures
|
|||||||
- **recurrence_timeframe** (integer, optional)
|
- **recurrence_timeframe** (integer, optional)
|
||||||
- **recurrence_basedate** (integer, optional)
|
- **recurrence_basedate** (integer, optional)
|
||||||
- **tags** ([]string, optional)
|
- **tags** ([]string, optional)
|
||||||
|
- **date_started**: d/m/Y H:i format (string, optional)
|
||||||
- Result on success: **task_id**
|
- Result on success: **task_id**
|
||||||
- Result on failure: **false**
|
- Result on failure: **false**
|
||||||
|
|
||||||
@@ -407,6 +408,7 @@ Response example:
|
|||||||
- **recurrence_timeframe** (integer, optional)
|
- **recurrence_timeframe** (integer, optional)
|
||||||
- **recurrence_basedate** (integer, optional)
|
- **recurrence_basedate** (integer, optional)
|
||||||
- **tags** ([]string, optional)
|
- **tags** ([]string, optional)
|
||||||
|
- **date_started**: ISO8601 format (string, optional)
|
||||||
- Result on success: **true**
|
- Result on success: **true**
|
||||||
- Result on failure: **false**
|
- Result on failure: **false**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user