Fix cosmetic issues and update api documentation
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
Version 1.0.26 (unreleased)
|
Version 1.0.26 (unreleased)
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
Breaking changes:
|
||||||
|
|
||||||
|
* API procedures: "moveColumnUp" and "moveColumnDown" are replace by "changeColumnPosition"
|
||||||
|
|
||||||
New features:
|
New features:
|
||||||
|
|
||||||
* Add drag and drop to change subtasks and columns positions
|
* Add drag and drop to change subtasks and columns positions
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Kanboard\Api;
|
namespace Kanboard\Api;
|
||||||
|
|
||||||
use Kanboard\Core\Base;
|
|
||||||
use Kanboard\Core\ObjectStorage\ObjectStorageException;
|
use Kanboard\Core\ObjectStorage\ObjectStorageException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ class Task extends Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,
|
$date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = 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 = '')
|
$recurrence_basedate = 0, $reference = '')
|
||||||
{
|
{
|
||||||
$this->checkProjectPermission($project_id);
|
$this->checkProjectPermission($project_id);
|
||||||
|
|
||||||
@@ -115,9 +115,9 @@ class Task extends Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,
|
$date_due = null, $description = null, $category_id = null, $score = 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)
|
$recurrence_timeframe = null, $recurrence_basedate = null, $reference = null)
|
||||||
{
|
{
|
||||||
$this->checkTaskPermission($id);
|
$this->checkTaskPermission($id);
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ class Auth extends Base
|
|||||||
if (! DISABLE_LOGOUT) {
|
if (! DISABLE_LOGOUT) {
|
||||||
$this->sessionManager->close();
|
$this->sessionManager->close();
|
||||||
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$this->response->redirect($this->helper->url->to('auth', 'index'));
|
$this->response->redirect($this->helper->url->to('auth', 'index'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ use Pimple\Container;
|
|||||||
* @property \Kanboard\Model\Board $board
|
* @property \Kanboard\Model\Board $board
|
||||||
* @property \Kanboard\Model\Category $category
|
* @property \Kanboard\Model\Category $category
|
||||||
* @property \Kanboard\Model\Color $color
|
* @property \Kanboard\Model\Color $color
|
||||||
|
* @property \Kanboard\Model\Column $column
|
||||||
* @property \Kanboard\Model\Comment $comment
|
* @property \Kanboard\Model\Comment $comment
|
||||||
* @property \Kanboard\Model\Config $config
|
* @property \Kanboard\Model\Config $config
|
||||||
* @property \Kanboard\Model\Currency $currency
|
* @property \Kanboard\Model\Currency $currency
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Kanboard\Model;
|
namespace Kanboard\Model;
|
||||||
|
|
||||||
use PicoDb\Database;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Board model
|
* Board model
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ class LastLogin extends Base
|
|||||||
|
|
||||||
if (count($connections) >= self::NB_LOGINS) {
|
if (count($connections) >= self::NB_LOGINS) {
|
||||||
$this->db->table(self::TABLE)
|
$this->db->table(self::TABLE)
|
||||||
->eq('user_id', $user_id)
|
->eq('user_id', $user_id)
|
||||||
->notin('id', array_slice($connections, 0, self::NB_LOGINS - 1))
|
->notin('id', array_slice($connections, 0, self::NB_LOGINS - 1))
|
||||||
->remove();
|
->remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class User extends Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $username Username
|
* @param string $username Username
|
||||||
* @return array
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getIdByUsername($username)
|
public function getIdByUsername($username)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -156,261 +156,3 @@ Response example:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## getColumns
|
|
||||||
|
|
||||||
- Purpose: **Get all columns information for a given project**
|
|
||||||
- Parameters:
|
|
||||||
- **project_id** (integer, required)
|
|
||||||
- Result on success: **columns properties**
|
|
||||||
- Result on failure: **empty list**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "getColumns",
|
|
||||||
"id": 887036325,
|
|
||||||
"params": [
|
|
||||||
1
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 887036325,
|
|
||||||
"result": [
|
|
||||||
{
|
|
||||||
"id": "1",
|
|
||||||
"title": "Backlog",
|
|
||||||
"position": "1",
|
|
||||||
"project_id": "1",
|
|
||||||
"task_limit": "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "2",
|
|
||||||
"title": "Ready",
|
|
||||||
"position": "2",
|
|
||||||
"project_id": "1",
|
|
||||||
"task_limit": "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "3",
|
|
||||||
"title": "Work in progress",
|
|
||||||
"position": "3",
|
|
||||||
"project_id": "1",
|
|
||||||
"task_limit": "0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## getColumn
|
|
||||||
|
|
||||||
- Purpose: **Get a single column**
|
|
||||||
- Parameters:
|
|
||||||
- **column_id** (integer, required)
|
|
||||||
- Result on success: **column properties**
|
|
||||||
- Result on failure: **null**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "getColumn",
|
|
||||||
"id": 1242049935,
|
|
||||||
"params": [
|
|
||||||
2
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 1242049935,
|
|
||||||
"result": {
|
|
||||||
"id": "2",
|
|
||||||
"title": "Youpi",
|
|
||||||
"position": "2",
|
|
||||||
"project_id": "1",
|
|
||||||
"task_limit": "5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## moveColumnUp
|
|
||||||
|
|
||||||
- Purpose: **Move up the column position**
|
|
||||||
- Parameters:
|
|
||||||
- **project_id** (integer, required)
|
|
||||||
- **column_id** (integer, required)
|
|
||||||
- Result on success: **true**
|
|
||||||
- Result on failure: **false**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "moveColumnUp",
|
|
||||||
"id": 99275573,
|
|
||||||
"params": [
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 99275573,
|
|
||||||
"result": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## moveColumnDown
|
|
||||||
|
|
||||||
- Purpose: **Move down the column position**
|
|
||||||
- Parameters:
|
|
||||||
- **project_id** (integer, required)
|
|
||||||
- **column_id** (integer, required)
|
|
||||||
- Result on success: **true**
|
|
||||||
- Result on failure: **false**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "moveColumnDown",
|
|
||||||
"id": 957090649,
|
|
||||||
"params": {
|
|
||||||
"project_id": 1,
|
|
||||||
"column_id": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 957090649,
|
|
||||||
"result": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## updateColumn
|
|
||||||
|
|
||||||
- Purpose: **Update column properties**
|
|
||||||
- Parameters:
|
|
||||||
- **column_id** (integer, required)
|
|
||||||
- **title** (string, required)
|
|
||||||
- **task_limit** (integer, optional)
|
|
||||||
- **description** (string, optional)
|
|
||||||
- Result on success: **true**
|
|
||||||
- Result on failure: **false**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "updateColumn",
|
|
||||||
"id": 480740641,
|
|
||||||
"params": [
|
|
||||||
2,
|
|
||||||
"Boo",
|
|
||||||
5
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 480740641,
|
|
||||||
"result": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## addColumn
|
|
||||||
|
|
||||||
- Purpose: **Add a new column**
|
|
||||||
- Parameters:
|
|
||||||
- **project_id** (integer, required)
|
|
||||||
- **title** (string, required)
|
|
||||||
- **task_limit** (integer, optional)
|
|
||||||
- **description** (string, optional)
|
|
||||||
- Result on success: **column_id**
|
|
||||||
- Result on failure: **false**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "addColumn",
|
|
||||||
"id": 638544704,
|
|
||||||
"params": [
|
|
||||||
1,
|
|
||||||
"Boo"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 638544704,
|
|
||||||
"result": 5
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## removeColumn
|
|
||||||
|
|
||||||
- Purpose: **Remove a column**
|
|
||||||
- Parameters:
|
|
||||||
- **column_id** (integer, required)
|
|
||||||
- Result on success: **true**
|
|
||||||
- Result on failure: **false**
|
|
||||||
|
|
||||||
Request example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"method": "removeColumn",
|
|
||||||
"id": 1433237746,
|
|
||||||
"params": [
|
|
||||||
1
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Response example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"jsonrpc": "2.0",
|
|
||||||
"id": 1433237746,
|
|
||||||
"result": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|||||||
229
doc/api-column-procedures.markdown
Normal file
229
doc/api-column-procedures.markdown
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
API Column Procedures
|
||||||
|
=====================
|
||||||
|
|
||||||
|
## getColumns
|
||||||
|
|
||||||
|
- Purpose: **Get all columns information for a given project**
|
||||||
|
- Parameters:
|
||||||
|
- **project_id** (integer, required)
|
||||||
|
- Result on success: **columns properties**
|
||||||
|
- Result on failure: **empty list**
|
||||||
|
|
||||||
|
Request example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "getColumns",
|
||||||
|
"id": 887036325,
|
||||||
|
"params": [
|
||||||
|
1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 887036325,
|
||||||
|
"result": [
|
||||||
|
{
|
||||||
|
"id": "1",
|
||||||
|
"title": "Backlog",
|
||||||
|
"position": "1",
|
||||||
|
"project_id": "1",
|
||||||
|
"task_limit": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "2",
|
||||||
|
"title": "Ready",
|
||||||
|
"position": "2",
|
||||||
|
"project_id": "1",
|
||||||
|
"task_limit": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "3",
|
||||||
|
"title": "Work in progress",
|
||||||
|
"position": "3",
|
||||||
|
"project_id": "1",
|
||||||
|
"task_limit": "0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## getColumn
|
||||||
|
|
||||||
|
- Purpose: **Get a single column**
|
||||||
|
- Parameters:
|
||||||
|
- **column_id** (integer, required)
|
||||||
|
- Result on success: **column properties**
|
||||||
|
- Result on failure: **null**
|
||||||
|
|
||||||
|
Request example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "getColumn",
|
||||||
|
"id": 1242049935,
|
||||||
|
"params": [
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 1242049935,
|
||||||
|
"result": {
|
||||||
|
"id": "2",
|
||||||
|
"title": "Youpi",
|
||||||
|
"position": "2",
|
||||||
|
"project_id": "1",
|
||||||
|
"task_limit": "5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## changeColumnPosition
|
||||||
|
|
||||||
|
- Purpose: **Change the column position**
|
||||||
|
- Parameters:
|
||||||
|
- **project_id** (integer, required)
|
||||||
|
- **column_id** (integer, required)
|
||||||
|
- **position** (integer, required)
|
||||||
|
- Result on success: **true**
|
||||||
|
- Result on failure: **false**
|
||||||
|
|
||||||
|
Request example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "changeColumnPosition",
|
||||||
|
"id": 99275573,
|
||||||
|
"params": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 99275573,
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## updateColumn
|
||||||
|
|
||||||
|
- Purpose: **Update column properties**
|
||||||
|
- Parameters:
|
||||||
|
- **column_id** (integer, required)
|
||||||
|
- **title** (string, required)
|
||||||
|
- **task_limit** (integer, optional)
|
||||||
|
- **description** (string, optional)
|
||||||
|
- Result on success: **true**
|
||||||
|
- Result on failure: **false**
|
||||||
|
|
||||||
|
Request example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "updateColumn",
|
||||||
|
"id": 480740641,
|
||||||
|
"params": [
|
||||||
|
2,
|
||||||
|
"Boo",
|
||||||
|
5
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 480740641,
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## addColumn
|
||||||
|
|
||||||
|
- Purpose: **Add a new column**
|
||||||
|
- Parameters:
|
||||||
|
- **project_id** (integer, required)
|
||||||
|
- **title** (string, required)
|
||||||
|
- **task_limit** (integer, optional)
|
||||||
|
- **description** (string, optional)
|
||||||
|
- Result on success: **column_id**
|
||||||
|
- Result on failure: **false**
|
||||||
|
|
||||||
|
Request example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "addColumn",
|
||||||
|
"id": 638544704,
|
||||||
|
"params": [
|
||||||
|
1,
|
||||||
|
"Boo"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 638544704,
|
||||||
|
"result": 5
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## removeColumn
|
||||||
|
|
||||||
|
- Purpose: **Remove a column**
|
||||||
|
- Parameters:
|
||||||
|
- **column_id** (integer, required)
|
||||||
|
- Result on success: **true**
|
||||||
|
- Result on failure: **false**
|
||||||
|
|
||||||
|
Request example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "removeColumn",
|
||||||
|
"id": 1433237746,
|
||||||
|
"params": [
|
||||||
|
1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 1433237746,
|
||||||
|
"result": true
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -52,6 +52,7 @@ Usage
|
|||||||
- [Projects](api-project-procedures.markdown)
|
- [Projects](api-project-procedures.markdown)
|
||||||
- [Project Permissions](api-project-permission-procedures.markdown)
|
- [Project Permissions](api-project-permission-procedures.markdown)
|
||||||
- [Boards](api-board-procedures.markdown)
|
- [Boards](api-board-procedures.markdown)
|
||||||
|
- [Columns](api-column-procedures.markdown)
|
||||||
- [Swimlanes](api-swimlane-procedures.markdown)
|
- [Swimlanes](api-swimlane-procedures.markdown)
|
||||||
- [Categories](api-category-procedures.markdown)
|
- [Categories](api-category-procedures.markdown)
|
||||||
- [Automatic Actions](api-action-procedures.markdown)
|
- [Automatic Actions](api-action-procedures.markdown)
|
||||||
|
|||||||
Reference in New Issue
Block a user