| 3 | | * Would run off tags on packages, tags of form 'todo.*' |
| | 3 | Extension name: ckanext-todo |
| | 4 | |
| | 5 | == User Story == |
| | 6 | |
| | 7 | === Package page === |
| | 8 | |
| | 9 | As a user I come to a package: |
| | 10 | |
| | 11 | * Have a todo count at that top that takes you down to the todo list (which may say nothing todo) |
| | 12 | * At the bottom is a section of the package display titled "ToDo" where I see a list of all toDos for the package most recent at the top |
| | 13 | * If I am logged in |
| | 14 | * See a form for "Add to do" at the top of the todo section and can add one straight away |
| | 15 | * I see a "now resolved" button next to each which goes green when you hover. |
| | 16 | When clicked the todo fades away. |
| | 17 | * Not logged in: I see a button that says "login to add todo" |
| | 18 | |
| | 19 | === Todo list page === |
| | 20 | |
| | 21 | When a user comes to todo overview at /todo |
| | 22 | |
| | 23 | At top list all todo categories with counts (or a progress bar). Click on category name or bar takes you down page to list for that category. |
| | 24 | |
| | 25 | Category list has a list of todo items (ul with li items with class todo) - link to package relevant to the todo. |
| | 26 | |
| | 27 | |
| | 28 | == Implementation == |
| | 29 | |
| | 30 | The Todo form |
| | 31 | |
| | 32 | * One of the fields is category -> autocomplete the category (not constrained) (lowercase, no spaces, .-_ allowed) |
| | 33 | * Add a description |
| | 34 | * Submit, the todo gets added via AJAX to the list at the top as the most recent todo |
| | 35 | |
| | 36 | Model: |
| | 37 | |
| | 38 | {{{ |
| | 39 | todo table |
| | 40 | |
| | 41 | id (autoincrement integer) |
| | 42 | package_id |
| | 43 | todo_category_id (required) |
| | 44 | description (required) |
| | 45 | created=NOW() |
| | 46 | resolved=null (unresolved) or a datetime (datetime of resolution) |
| | 47 | creator=user |
| | 48 | resolver=user |
| | 49 | |
| | 50 | todo_category table |
| | 51 | id |
| | 52 | name |
| | 53 | |
| | 54 | Prepopulate with: broken-resource-link, no-author, bad-format, add-description |
| | 55 | }}} |
| | 56 | |
| | 57 | API at /api/2/todo |
| | 58 | * GET / POST / PUT ... |
| | 59 | |
| | 60 | /api/2/todo?package=package_id_or_name&category=...&resolved=0/1 |
| | 61 | * support limit (?) |
| | 62 | |
| | 63 | /api/2/todo/category -> return list of todo categories |
| | 64 | * No GET / PUT / POST (these are auto-created by creation of todo) |
| | 65 | |
| | 66 | == Optional Extras (Will not be done atm) == |
| | 67 | |
| | 68 | * Integrate todo tags (e.g. list packages tagged with a todo.{xxx} on Todo List page ... |