Tasks - edmozley/freeitsm GitHub Wiki

Tasks

Folder: tasks/

Kanban-style task management for tracking internal work โ€” separate from tickets, which represent end-user-raised issues. Tasks are for the IT team's own work: project follow-ups, admin items, things spawned out of a ticket but tracked separately.

tasks_1

Tasks can repeat โ€” daily, weekly, monthly or yearly, on chosen weekdays, on a day of the month including the last, or on a named weekday such as the third Monday โ€” either when you complete the last one or on a fixed schedule. See Repeating tasks.

๐Ÿ”ด A repeat set to a fixed schedule needs cron/task_recurrence.php running. Without it nothing is created and nothing warns you โ€” see Scheduled tasks.

The Table view supports saved views: save the columns, sort and filters under a name, share it with a team or everyone, and set one as the view the table opens with.

Views

The same tasks are presented through four views. A change made in one is reflected in all of them.

  • Board (tasks/) โ€” a Kanban board with one column per status (see below), drag-and-drop card movement, and drag-to-reorder columns
  • List (tasks/, View toggle) โ€” a sortable table; click any column header to sort, click again to reverse
  • Calendar (tasks/calendar/) โ€” a month grid placing tasks by due date, coloured by status
  • Timeline (tasks/timeline/) โ€” a Gantt-style chart, one bar per task from start date to due date

The Board

Columns are statuses

The board generates one column per active status from Settings โ†’ Statuses, in display order, each headed with the status's colour. Adding a status adds a column โ€” there is no separate "column" concept. The three hardcoded To Do / In Progress / Done columns were replaced by this dynamic model, so custom statuses (e.g. Blocked, an Icebox) get their own column and nothing silently falls off the board.

Or columns by analyst (2.10.0)

Columns โ†’ Analyst in the left panel, under View, shows one column per person with tasks in view instead - yours first, Unassigned last - and each card carries a chip with its status. Dragging a card to another person's column assigns the task to them, through the same save as changing the assignee in the panel, so notifications and workflow events behave the same way. A task still assigned to an analyst who no longer exists sits under Former analyst #id rather than disappearing.

The choice is per analyst and remembered (user_preferences.tasks_board_group); nothing in the schema changed. Dragging columns to reorder them and the quick-add + are status features, so they are off in this mode. How it is built: Task board and subtasks โ€” Developer Guide.

Drag a column header left or right to reorder the columns โ€” this rewrites the underlying task_statuses.display_order (via reorder_task_statuses.php), so the board and the Settings tab stay in sync.

Cards

  • Drag a card to another column to change its status, or up/down within a column to reorder. Dropping into a Closed status stamps the completion time.
  • Quick create โ€” the + on a column header opens an inline box; type a title, press Enter, and the task is created in that column's status, assigned to you.
  • Right-click any card for a context menu โ€” assign analyst, assign team, change status, change priority, or create a subtask โ€” without opening the card.
  • Configurable card fields โ€” Settings โ†’ Card chooses which extras each card shows: assignee initials, team, start date, due date, a description excerpt (first 250 chars), subtask progress, and a linked-item indicator. Priority is chosen separately, below.
  • Subtasks under the card (2.10.0) โ€” a task's subtasks are listed beneath its card like branches of a tree, ticked or not, with a due date when one is set and not yet done. Click a subtask to open it (not its parent). They ride on the same subtask progress card setting as the 3/5 bar. Which ones are listed is each analyst's choice (#184): Subtasks on cards in the sidebar (also in Preferences) is All, Open โ€” only the ones still to do โ€” or None, just the count. Click a card's count (e.g. 1/4) to show or hide that one card's subtasks whatever the setting; both are remembered. Open replaced the older Preferences switch Hide them once all are complete, and anybody who had that on starts on Open.

Priority on a card

Requested in discussion #108. Settings โ†’ Card offers four placements for a task's priority, rather than a simple on/off:

Placement What appears
Hidden Nothing
Dot A coloured dot โ€” the default
Dot and name The dot, with the priority's name beside it
Left edge A coloured stripe down the left side of the card

The choice follows the task everywhere it is drawn โ€” the board, the timeline, and the subtask list inside a task โ€” so all three read the same way. The list view is the one exception: it always shows the dot and the name, because that view is a table with a column headed Priority.

A live preview sits under the options, built from the real card markup so it cannot drift from the board. It previews your own default priority, so you see your names in your colours.

The colour is the one set against each priority under Settings โ†’ Priorities. Nothing is derived from the priority's name, so renaming or translating your priorities โ€” or adding new ones โ€” keeps the indicator working. This was not always true: see the priority dot was invisible if you had renamed your priorities.

Search

A search box at the top of the sidebar filters the board and list as you type, matching task title and description (and tag names, if enabled). Multi-word queries are AND-matched. Filtering is client-side on the loaded task set, so it is instant.

Hide done (3.9.0, #184) โ€” a tick in the sidebar's Show section leaves out every task in a closed status, on the board and the list. On the status board the closed columns (Done, Cancelled) go too, since they could only ever be empty. Remembered per analyst, like Board/List. A done task never shows Overdue or Due today anyway โ€” before 3.9.0 the card and the list said Overdue for a task finished late.

Calendar View

A month grid (Monday-first) with prev / next / today navigation and a status-colour legend. How a multi-day task (start date earlier than due date) is drawn is configurable per-install in Settings โ†’ Calendar:

Mode Behaviour
Deadline chip (default) One chip on the due date only โ€” tidiest
Spanning bar One continuous bar across the range, wrapping at week rows, lane-stacked so bars never overlap
Every day A chip in every day cell the task covers

A task with only a due date always shows as a single chip whatever the mode. Clicking a task deep-links to the board with its panel open (?task=N).

Timeline View

A Gantt-style chart. Each task with at least one date is a horizontal bar from its start date to its due date (a due-date-only task is a single-day bar). Rows group by assignee, status, or flat; a dashed marker shows today; the task-name column and date header stay put while scrolling; and a zoom control switches the day-column width.

Detail Panel

A slide-in panel; every field auto-saves the moment it changes (no save button):

  • Title, Status, Priority โ€” status/priority dropdowns are built from the configured lookups
  • Assignee and Team
  • Start Date and Due Date โ€” together they define the span shown on the calendar and timeline
  • Estimate (hours) (3.3.0) โ€” how long the work should take. Optional; Projects reads it for estimate-against-logged and the Capacity page
  • Tags โ€” a type-to-filter picker (see below)
  • Description โ€” TinyMCE rich text
  • Links โ€” searchable attach of related tickets / changes
  • Subtasks and Comments
  • Work starts / Work ends and All day โ€” when the task is planned for. Naive wall-clock values: a 2pm slot reads 2pm for everybody, exactly like a ticket's scheduled work
  • Time โ€” how long the work actually took, as many sittings as it needed, each with a note, totalled. A parent also shows the total including its subtasks. Unlike the fields above, these are real instants and convert to each reader's timezone

The delete button removes the task and all its subtasks (with confirmation).

Panel or large window

The panel slides in from the right by default, which keeps the board visible behind it. The expand button in its corner swaps to a large, nearly full-screen window that lays the same content out in two columns โ€” description, subtasks and comments on the left, the short fields down a narrow right-hand column, the title across the top. It collapses back the same way.

The choice is remembered per analyst and can also be set at System โ†’ Preferences โ†’ Opening a task. Both write the same tasks_detail_view preference, so they always agree. Below 1100px the window falls back to a single column, and on a phone it fills the screen. In the tabs layout (the button beside expand), the Details tab fits as many fields to a row as the window allows - six on a wide screen - with the people involved, tags, checklist, repeats and the description each on a full row, so the description is on screen without scrolling (3.9.0).

Right-click a card

Most of the panel is reachable without opening the task:

Open Opens the task in whichever view you prefer
Assign to me One click, no submenu
Assign analyst / team, Change status / priority Submenus built from the configured lookups
Due date Today, tomorrow, next Monday, or clear it
Mark complete / Reopen Decided by the status's Closed flag, so it still works if you rename Done
Log time Opens the task with the cursor in the minutes box. Absent where Settings โ†’ Time excludes that kind of task
Create subtask, Copy link, Delete Delete names the task and asks first

Tags

Multi-value labels for cross-cutting themes โ€” e.g. Security, ISO, Environment (seeded as defaults). Status answers "what stage?", priority "how urgent?", and a tag "what is this about?" A task can carry any number of tags.

Tags are managed in Settings โ†’ Tags (each a name + colour). Five Display options there govern tagging:

  • Allow new tags from a task โ€” off = a fixed, governed vocabulary (tags added only in Settings); on = analysts can create tags inline from the task picker
  • Card chips โ€” coloured tag chips on board/list cards
  • Sidebar filter โ€” a tag filter dropdown in the board/list sidebar
  • Search matching โ€” the search box also matches tag names
  • Calendar & timeline โ€” small tag dots on task bars in those views

Subtasks

Two-level hierarchy (a subtask is a tasks row with a parent_task_id). Parent cards show a progress indicator (e.g. 3/5) and, since 2.10.0, list the subtasks themselves (see Cards above).

Inside the task, each subtask is a row: a โ‹ฎโ‹ฎ handle, the tick box, its priority and title, who has it, and its Start and Due dates in two columns that line up down the list. Where that does not fit โ€” the side panel, a phone โ€” each subtask takes two lines: its name across the full width, then who has it and the two dates under their headings (#184: before 3.9.0 the side panel squeezed the name out entirely).

  • Tick the box to complete it; click the row to open the subtask.
  • Change a date in place. Saving one does not rebuild the window, so you stay where you were (and on the Subtasks tab, if you use tabs).
  • Drag a row by its handle to change the order. The board lists them in the same order. Only the handle starts a drag, so clicking a row or selecting its text behaves as before.
  • Adding one: type a title, optionally give a start and a due date, press Enter or Add. A new subtask goes to the bottom of the list.

How it is built: Task board and subtasks โ€” Developer Guide.

Subtasks or a checklist? A subtask is a piece of work with its own owner and due date. A checklist is the steps of one job, ticked off by whoever is doing it - and it can stop the task being completed until its Critical steps are done. Checklists on tasks are off until switched on (see Settings below).

Linking

A task can be attached to:

  • A ticket โ€” when a ticket leads to follow-up work ("order the replacement PSU")
  • A change โ€” pre-implementation prep tied to a change request
  • A contract โ€” work carried out under a support agreement

A task belongs to at most one ticket. A ticket, though, can have as many tasks as it needs โ€” the link is a column on the task, so several tasks can point at the same ticket.

From the ticket (discussion #83)

Tickets show their tasks, and can create them. In the Links bar at the top of a ticket โ€” the same bar that holds problems, changes, equipment and CMDB objects โ€” choose Link toโ€ฆ โ†’ Task:

  • One box does both jobs. Typing searches your existing tasks and offers to create a task with exactly what you typed. You see the near matches as you type, which is what stops a second copy of a task that already exists.
  • A task created here is assigned to you and takes the ticket's company, so it lands on your own list and alongside that client's work.
  • The pill shows progress โ€” โ˜ while outstanding, โ˜‘ once done, and a fraction such as 2/5 when the task has subtasks.
  • Right-click a ticket in the list and choose Link to taskโ€ฆ to attach one without opening the ticket.
  • The โœ• unlinks, it does not delete. The task stays in the Tasks module; deleting is done from the task itself.
  • Closing a ticket with unfinished tasks warns you, but never blocks โ€” the outstanding work is often somebody else's by then.

A task and the ticket it is attached to must belong to the same company. That holds even for staff who can reach both, because a scope check alone would happily let one client's task be attached to another's ticket. See Multi-Tenancy Progress.

From the change or contract

The link is visible from the task, in its detail panel. Changes and contracts do not yet list the tasks attached to them โ€” only tickets do. That is the obvious next step if it turns out to be wanted.

Filtering

Every view shares the sidebar filters:

  • My Tasks / All Tasks
  • Team
  • Analyst
  • Tag (when the sidebar-filter tag option is enabled)
  • Project (3.2.0) - All projects, Not in a project, or one project; shown only when a task on the board belongs to a project

Projects (3.2.0)

A project's work items are ordinary tasks, so they stay on this board for the people doing them. A card that belongs to a project shows a chip with the project's name in its colour, and the task window has a Project field for top-level tasks (a picker for analysts who can open Projects, plain text for everyone else). Deleting a project never deletes its tasks. See Projects.

Contractors (3.3.0)

When an outside firm does the work, give the task to a contractor: in the task window, Contractor is a supplier from Contracts and Contact there is a person at that supplier (optional). The Assignee stays the person here who owns the task and chases them. Choosing a contractor needs access to Contracts; anyone who can see the task sees the firm's name.

The card shows the firm (and person), and a Contractor filter appears in the left panel once any task has one: one firm, With a contractor or Not with a contractor. Projects can email the person at the firm when they are given a task and when it is due - off unless someone turns it on. See Projects - Contractors.

Settings

tasks/settings/ has eight tabs:

Tab Configures
Statuses Workflow states (= board columns) โ€” name, colour, display order, default, Closed flag, active flag
Priorities Priority bands โ€” name, colour, default. The colour set here is the colour drawn on cards, the timeline and subtasks
Calendar Multi-day render mode โ€” deadline chip / spanning bar / every day
Card Which extra fields appear on board cards, and how priority is shown โ€” hidden, dot, dot and name, or a left-edge stripe
Tags The tag list, plus the five tag display options
Time Where scheduled work and time entries are offered: tasks, subtasks, both, or nowhere
Involved Whether each person on a task ticks off their own part (GH #89)
Checklists Whether tasks can carry checklists from the Checklists module (off by default, 2.10.0) - see Checklists on tasks

Module options (tasks_calendar_span_mode, tasks_card_fields, tasks_tag_settings, tasks_time_scope, tasks_collaborator_completion, tasks_checklists_enabled) are stored as keys in the shared system_settings table.

Internationalisation

The whole module โ€” PHP pages and JavaScript โ€” runs through the shared i18n system. Strings resolve through t('tasks.*'), with lang/<locale>/tasks.php files for all 24 supported locales and per-key fallback to English. The active language follows the analyst's interface-language preference. Date formatting follows the page locale, so month and weekday names localise too.

Help Guide

tasks/help.php โ€” a built-in scroll-spy guide (reachable from the Help link in the module header) covering the board, list, calendar, timeline, the task panel, tags and settings.

Watchtower Integration

Overdue and due-today counts appear on the Watchtower attention dashboard so unfinished work surfaces alongside open tickets and pending changes.

Contracts Integration

The Contracts module's view page has Create Task and Add to Calendar buttons that open inline modals โ€” they prefill sensible defaults from the contract (title, description, due date = notice date or end date, assignee = contract owner) and link the new task back to the contract via contract_id. See Contracts.

Key Tables

Table Purpose
tasks Core task record (subtasks are rows with parent_task_id; tenant_id is the owning company, NULL = Default)
task_statuses Status lookup โ€” drives the board columns
task_priorities Priority lookup
task_comments Threaded comments
task_tags Tag lookup (name, colour)
task_tag_map Task โ†” tag many-to-many junction
task_time_entries Time recorded against a task โ€” one row per sitting. Mirrors ticket_time_entries
tasks.assigned_supplier_id / assigned_contact_id (3.3.0) The contractor doing the task - a supplier and a person there (suppliers, contacts); includes/task_contractors.php

Related pages

One ticket, one change

A task links to at most one ticket and one change โ€” tasks.ticket_id and tasks.change_id are single columns, not join tables. The search boxes stay visible once something is linked and offer to link one instead, and choosing a different record asks first, naming what would be unlinked.

The same warning appears from the other end: attaching a task that already belongs to another ticket moves it, so the Tickets picker marks such a row currently on TICKET-x and asks before doing it. Both sides of the relationship confirm, because it is one event and they should not disagree about whether it is worth confirming.


The large window: one page, or tabs

A task opens in the side panel by default; the โคข button in its header switches to a large window, and remembers which you prefer.

Inside the large window there is a second button, offering two shapes for the same task:

Layout What it does
Two columns The description, subtasks and comments down the left, the short fields stacked on the right. the default
Tabs Details ยท Subtasks ยท Time ยท Comments ยท Links ยท Documents.

A task carries a lot now โ€” its fields, the people involved, tags, a description, repeats, links, subtasks, time recorded, comments and any attached documents โ€” so reaching the comments can mean scrolling past all of it. Tabs put each part one click away.

Neither is imposed, and columns stay the default: one long page is genuinely better when you want to take the whole task in at once.

  • Tabs holding a list carry a count โ€” Subtasks (3), Comments (2), Documents (6) โ€” so three subtasks behind a tab are never mistaken for none. The Documents count arrives a moment after the window opens, once the documents have loaded.
  • They look like tabs (2.10.0): each one a raised tab on a line, the open one joined to the page below it, and all the same width, so the strip is evenly spaced whatever the labels say.
  • An empty tab is not drawn. A subtask cannot have subtasks of its own, so it simply shows fewer tabs.
  • The button appears only in the large window โ€” there is nothing in the side panel it could apply to.
  • On a phone the strip scrolls sideways rather than wrapping into three rows.

The choice is remembered per analyst, so it does not affect anybody else.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ