add issue information

This commit is contained in:
Dennis Eichhorn 2020-05-22 17:31:23 +02:00
parent 8b48780f74
commit 70d2f68a9d
6 changed files with 200 additions and 1 deletions

View File

@ -16,11 +16,13 @@ Feel free to grab any open issue implement it and create a new pull request. Mos
```php
/**
* @todo Orange-Management/Modules#ISSUE_NUMBER
* @todo Orange-Management/Orange-Management#ISSUE_NUMBER [d:difficulty]
* Description for the issue
*/
```
The issue information can be used to provide additional information such as priority, difficulty and type. For your first issue try to find a issue marked `[d:first]` or `[d:beginner]`.
### Code Style
Not always are the defined coding style standards upheld, if you notice that simply create a new pull request with the fix.

3
Docs/Dev/en/SUMMARY.md Normal file
View File

@ -0,0 +1,3 @@
# Developer Content
* [Task]({%}&page=Dev/task)

153
Docs/Dev/en/task.md Normal file
View File

@ -0,0 +1,153 @@
# Task
## Create
```php
$response = new HttpResponse();
$request = new HttpRequest();
$request->setData('id', <id>);
$request->setData('title', <title>);
$request->setData('description', <description>);
$request->setData('due', <due>);
$request->setData('status', <status>);
$request->setData('type', <type>);
$request->setData('priority', <priority>);
$request->setData('closable', true|false); // optional
$request->setData('editable', true|false); // optional
$module = $this->app->moduleManager->get('Tasks');
$module->apiTaskCreate($request, $response);
```
#### Web
| HTTP Method | URI |
| ----------- | ------ |
| POST | /tasks |
```
{
"id": <id>,
"title": <title>,
"description": <description>,
"due": <due>,
"status": <status>,
"type": <type>,
"priority": <priority>,
"closable": true|false
"editable": true|false
}
```
### Type
Aside from the normal tasks it's also possible to mark task completely invisible in the task overview and task list. This may be helpful if other modules want to make use of the Tasks module without directly showing this to the user. Additionally, it's also possible to define task templates which can be re-used.
```php
$response = new HttpResponse();
$request = new HttpRequest();
$request->setData('id', <id>);
$request->setData('type', <type>);
$module = $this->app->moduleManager->get('Tasks');
$module->apiTaskSet($request, $response);
```
#### Web
| HTTP Method | URI |
| ----------- | ------ |
| POST | /tasks |
```
{
"id": <id>,
"type": <type>
}
```
### Editable
```php
$response = new HttpResponse();
$request = new HttpRequest();
$request->setData('id', <id>);
$request->setData('editable', true|false);
$module = $this->app->moduleManager->get('Tasks');
$module->apiTaskSet($request, $response);
```
#### Web
| HTTP Method | URI |
| ----------- | ------ |
| POST | /tasks |
```
{
"id": <id>,
"editable": true|false
}
```
### Closable
By default tasks are closable by a user in the task itself however, in some situations users should not be able to manually close a task but the task should be closed automatically depending on actions in a different module. By defining a task as none-closable the task can only be closed based on the action in a different module and a user cannot directly close a task in the Tasks module.
```php
$response = new HttpResponse();
$request = new HttpRequest();
$request->setData('id', <id>);
$request->setData('closable', true|false);
$module = $this->app->moduleManager->get('Tasks');
$module->apiTaskSet($request, $response);
```
#### Web
| HTTP Method | URI |
| ----------- | ------ |
| POST | /tasks |
```
{
"id": <id>,
"closable": true|false
}
```
## Status Change
### API
#### Internal
```php
$response = new HttpResponse();
$request = new HttpRequest();
$request->setData('id', <id>);
$request->setData('status', <status>);
$module = $this->app->moduleManager->get('Tasks');
$module->apiTaskSet($request, $response);
```
#### Web
| HTTP Method | URI |
| ----------- | ------ |
| POST | /tasks |
```
{
"id": <id>,
"status": <status>
}
```

3
Docs/Help/en/SUMMARY.md Normal file
View File

@ -0,0 +1,3 @@
# User Content
* [Task]({%}&page=Help/task)

38
Docs/Help/en/task.md Normal file
View File

@ -0,0 +1,38 @@
# Task
A task can be created by yourself, another user or by another module as part of a workflow. Tasks (or TODOs) are used to describe what needs to be done and with which priority they should be done. In some cases other modules can also create tasks for users as part of their purpose and workflow.
## Priority & Due
Tasks can have either a priority or a due date. Both are exclusive and cannot be used in combination. In some cases it can make more sense to give something a priority if no definitive due date is known/agreed upon and in some situations a fixed due date can be used.
When sorting tasks the priorities are sorted according to the following criteria:
* Very high = same as due in 1 day
* High = same as due in 1 week
* Medium = same as due in 2 weeks
* Low = same as due in 1 month
* Very low = due after 1 month
## Visibility
Tasks are visible to:
* people/groups the task is assigned to
* people/groups mentioned in copy
* the person who created the task
* people/groups the task got forwarded to
## Editable
A task can be made editable or locked. In case a task is marked as locked, the task and created responses cannot be changed. This can be important for tasks which need to be auditable / non-changable (e.g. ISO system). A task which is defined as locked can never be made editable again, so please be careful when you choose to define a task as locked. By default tasks are editable.
## Status
The status of a task can be one of the following:
* Open = default status
* Working = working on task
* Suspended = task is on hold
* Canceled = task got canceled/aborted
* Done = task is completed