TaskBoard.h header

#include <ew/core/TaskBoard.h>

Namespace ew::core

Functions

std::vector< ContentId > ew::core::orderedTasksInStatus(const Project &project, const QString &board, const QString &status)

The ids of the tasks on board whose status is status, ordered by sort index, then descending priority, then title, then id – the order of cards within a kanban column. This is the single source of truth for column order, shared by the column model and MoveTaskCommand.

QStringList ew::core::taskBoardStatuses(const Project &project, const QString &board)

The kanban columns for board in project: the board's default columns (Tasks and unknown boards use To Do/Doing/Done; Submissions uses Querying/Submitted/Accepted/ Rejected) followed by any other non-empty status present on that board's tasks (sorted), so no task is hidden.

QStringList ew::core::taskBoards(const Project &project)

The boards present in project: the default boards (Tasks, Submissions) followed by any other board a task belongs to (sorted). Drives the board selector.

int ew::core::taskDropIndex(const Project &project, const QString &board, ContentId taskId, const QString &status, int row)

The insertion index to pass to MoveTaskCommand for a drag that drops taskId into the board column status at visual position row (or -1 to append). When the task stays in the same column it is removed before reinsertion, so a drop below its current position is shifted up by one; moves to a different column use the row as given.