Tasks Module
The HtkDoli Tasks module lets you consult, create, edit and track the progress of tasks linked to your Dolibarr projects. Every task is mandatorily attached to a project.
Task List
The main screen displays the list of all your tasks, grouped by month/year or by letter depending on the chosen sort.
Search, Sort and Filters
-
Search bar: search by task reference or label.
-
Sort:
- Date (Newest → Oldest)
- Date (Oldest → Newest)
- Reference (A-Z)
- Reference (Z-A)
Date sorting is based on the task's start date.
-
Progress filters (each entry shows a counter):
- All
- To do: progress at 0%
- In progress: progress between 1% and 99%
- Completed: progress ≥ 100%
-
Floating index bubble: while scrolling, a bubble shows the current letter (reference sort) or the current month (date sort).
Information displayed (Task cards)
Each row shows:
- A circular progress indicator:
- Empty grey circle if the task has not started (0%).
- Percentage in blue if the task is in progress.
- Green checkmark if the task is completed (≥ 100%).
- The label (or the reference if no label).
- The end date if set (in red if overdue and the task is not completed).
- The Dolibarr reference.
- The parent project identifier ("Projet #ID").
Quick actions on the list
- Swipe from the left edge: Edit the task, and Finish (if progress is < 100%).
- Swipe from the right edge: Delete the task.
- Context menu (long press): offers the same actions (Edit, Finish if < 100%, Delete).
- Floating "+" button at the bottom right: creates a new task.
Pagination and States
- Paginated synchronization in batches of 50 tasks, with a "Load more" button.
- Pull-to-refresh to resynchronize the list.
- Refresh state indicator (up to date / stale / loading / success / failure).
- Clear empty-list message, differentiated by search, filter or absence of data.
Detail / Creation / Edit Sheet
The detail screen also serves for creating and editing a task. It is organized into cards.
Header
Dynamic title: "New task" or "Edit task", with contextual help text.
Information
- Title of the task (required field).
- Description (multiline text area).
Notes
- Public note (visible in some exports / to everyone).
- Private note (internal use).
Planning
- Start date: enabled via a toggle, with a date + time picker.
- End date: enabled the same way.
Progress
- Progress slider from 0% to 100%, in steps of 5%.
Details
- Priority: Low, Normal, High (with color code: green / orange / red).
- Expected load: entry of the estimated duration in hours and minutes (converted to seconds for Dolibarr).
Project link
- Project picker among your existing projects. A project must be selected to save the task.
- When opened from a project, the parent project is pre-selected.
- Warning message when no project is selected: "A project is required to create a task."
- If no project is available, the picker shows "No project available".
Assigned users (existing task only)
When consulting an existing task, an "Assigned users" card (icon person.2.circle.fill) is displayed:
- List of assigned users: avatar with initials, full name and job title (falls back to the login when no job is set).
- Swipe left on a row to reveal the "Unlink" action: the user is immediately unassigned through the Dolibarr API (
DELETE /tasks/{id}/users/{userId}), then the list refreshes. - "Add a user" button at the bottom of the card: opens the picker sheet (
TaskUserSelectionSheet), which lists active users. The list reloads automatically once the sheet is dismissed. - Message "No user assigned to this task." when the list is empty.
- Add/remove actions are gated by the Dolibarr permission
task.creerorprojet.creer. Without this permission, the card remains visible but the actions are hidden. - Every action (assignment, unassignment, error) triggers an informative toast.
Validation and saving
- The Save button is disabled while the title is empty or no project is selected.
- On error, an error card is shown in the sheet.
Time Tracking
⚠️ Technical note: a time-tracking screen (
TaskTimeTrackingView) exists in the app but is not yet reachable from the interface (no entry point leads to it). The description below documents its intended behavior.
This screen will let you record working time on an existing task:
- Date of the entry (default: today; date + time picker).
- Duration in hours (0 to 23) and minutes (0 to 59).
- Descriptive note of the work done (optional).
- The Save button is enabled only when the duration is greater than 0.
- The entry is placed in the synchronization queue (
TaskTimeSpent) and sent to Dolibarr (POST /tasks/{id}/time) on the next cycle; the logged-in user is used by default.
Business Behavior and Dolibarr
Progress cycle
A task's progress is an integer from 0 to 100. HtkDoli interprets:
0→ To do1to99→ In progress≥ 100→ Completed
The visual badge in the list and the progress filter follow this logic automatically.
Creation and Modification (offline "Offline-First" mode)
- Creation: the task is first saved locally with a provisional reference (e.g.
(PROV)-A1B2C3) and an initial status of 0, then added to the synchronization queue (POST). - Modification: your changes are reflected immediately on screen (Optimistic UI) then queued (
PUT). - Finish (from the list): progress is set to 100% locally and a
PUTprogress: 100is sent; on failure, the previous progress is restored.
Rights and Permissions
- Read: read permission on the Tasks/Projects module required.
- Creation ("+" button in the top bar):
projet.creerpermission. - Managing assigned users:
task.creerorprojet.creerpermission.
Dolibarr business note: Task management is closely tied to project management. To create or modify tasks via HtkDoli, your Dolibarr user must have write rights on the Projects module.
Synchronization
- List paginated in batches of 50.
- Creation, modification and time entries all go through the local synchronization queue (
PendingModification), propagated by theUpdateManager. Nothing is sent in blocking synchronous mode. - Notable technical fields:
fk_project(project link) andplanned_workloadin seconds (expected load).
Screenshots
2 screenshots — click to enlarge