iteration
struct IterationListParams
pub struct IterationListParamsQuery parameters for the iteration list view (status tab selection).
| Field | Type | Description |
|---|---|---|
status |
Option<String> | The status tab to show: all, or an iteration status such as active. A missing value means all. A value that is not a status also shows every iteration. |
Implements Deserialize<'de>.
struct IterationBoardData
struct IterationBoardDataShared data backing both the full iteration board page and the SSE fragment.
| Field | Type | Description |
|---|---|---|
cancelled_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is cancelled. |
done_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is done. |
in_progress_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is in-progress. |
iteration |
iteration::Model | The iteration that the board shows. |
open_tasks |
Vec<IterationTaskRow> | Tasks of the iteration with any other status, shown in the open column. |
struct IterationBoardFragmentTemplate
struct IterationBoardFragmentTemplateThe board’s columns alone, which the SSE live reload swaps into the board page.
| Field | Type | Description |
|---|---|---|
cancelled_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is cancelled. |
done_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is done. |
in_progress_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is in-progress. |
iteration |
iteration::Model | The iteration that the board shows. |
open_tasks |
Vec<IterationTaskRow> | Tasks of the iteration with any other status, shown in the open column. |
Implements Template, Display, FastWritable.
struct IterationBoardTemplate
struct IterationBoardTemplateThe full board page of one iteration, with its tasks in status columns.
| Field | Type | Description |
|---|---|---|
cancelled_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is cancelled. |
done_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is done. |
in_progress_tasks |
Vec<IterationTaskRow> | Tasks of the iteration whose status is in-progress. |
iteration |
iteration::Model | The iteration that the board shows. |
open_tasks |
Vec<IterationTaskRow> | Tasks of the iteration with any other status, shown in the open column. |
Implements Template, Display, FastWritable.
struct IterationDetailData
struct IterationDetailDataShared data backing both the full iteration detail page and the SSE fragment.
| Field | Type | Description |
|---|---|---|
description_html |
String | The iteration’s Markdown description, rendered to HTML. |
iteration |
iteration::Model | The iteration that the page shows. |
phases |
Vec<PhaseGroup> | The iteration’s tasks grouped by phase, in ascending phase order. |
status_counts |
StatusCounts | How many of the iteration’s tasks are in each status. |
tags |
Vec<String> | The labels of the iteration’s tags. |
task_count |
i64 | How many tasks the iteration holds in all. |
timeline_items |
Vec<TimelineItem> | The iteration’s timeline, from timeline::build_timeline. |
struct IterationDetailFragmentTemplate
struct IterationDetailFragmentTemplateThe detail content alone, which the SSE live reload swaps into the detail page.
| Field | Type | Description |
|---|---|---|
description_html |
String | The iteration’s Markdown description, rendered to HTML. |
iteration |
iteration::Model | The iteration that the page shows. |
phases |
Vec<PhaseGroup> | The iteration’s tasks grouped by phase, in ascending phase order. |
status_counts |
StatusCounts | How many of the iteration’s tasks are in each status. |
tags |
Vec<String> | The labels of the iteration’s tags. |
task_count |
i64 | How many tasks the iteration holds in all. |
timeline_items |
Vec<TimelineItem> | The iteration’s timeline, from timeline::build_timeline. |
Implements Template, Display, FastWritable.
struct IterationDetailTemplate
struct IterationDetailTemplateThe full detail page of one iteration: description, tags, phases and timeline.
| Field | Type | Description |
|---|---|---|
description_html |
String | The iteration’s Markdown description, rendered to HTML. |
iteration |
iteration::Model | The iteration that the page shows. |
phases |
Vec<PhaseGroup> | The iteration’s tasks grouped by phase, in ascending phase order. |
status_counts |
StatusCounts | How many of the iteration’s tasks are in each status. |
tags |
Vec<String> | The labels of the iteration’s tags. |
task_count |
i64 | How many tasks the iteration holds in all. |
timeline_items |
Vec<TimelineItem> | The iteration’s timeline, from timeline::build_timeline. |
Implements Template, Display, FastWritable.
struct IterationListData
struct IterationListDataShared data backing both the full iteration list page and the SSE fragment.
| Field | Type | Description |
|---|---|---|
active_count |
usize | How many of the project’s iterations are active, whatever the status tab. |
cancelled_count |
usize | How many of the project’s iterations are cancelled, whatever the status tab. |
completed_count |
usize | How many of the project’s iterations are completed, whatever the status tab. |
current_status |
String | The selected status tab: the status query value, or all when there is none. |
rows |
Vec<IterationRow> | The iterations that the selected status tab shows, with their tags and counts. |
struct IterationListFragmentTemplate
struct IterationListFragmentTemplateThe list content alone, which the SSE live reload swaps into the list page.
| Field | Type | Description |
|---|---|---|
active_count |
usize | How many of the project’s iterations are active, whatever the status tab. |
cancelled_count |
usize | How many of the project’s iterations are cancelled, whatever the status tab. |
completed_count |
usize | How many of the project’s iterations are completed, whatever the status tab. |
current_status |
String | The selected status tab: the status query value, or all when there is none. |
rows |
Vec<IterationRow> | The iterations that the selected status tab shows, with their tags and counts. |
Implements Template, Display, FastWritable.
struct IterationListTemplate
struct IterationListTemplateThe full iteration list page, with a tab for each status.
| Field | Type | Description |
|---|---|---|
active_count |
usize | How many of the project’s iterations are active, whatever the status tab. |
cancelled_count |
usize | How many of the project’s iterations are cancelled, whatever the status tab. |
completed_count |
usize | How many of the project’s iterations are completed, whatever the status tab. |
current_status |
String | The selected status tab: the status query value, or all when there is none. |
rows |
Vec<IterationRow> | The iterations that the selected status tab shows, with their tags and counts. |
Implements Template, Display, FastWritable.
struct IterationRow
struct IterationRowOne row of the iteration list: an iteration with its tags and counts.
| Field | Type | Description |
|---|---|---|
iteration |
iteration::Model | The iteration that the row shows. |
phase_count |
u32 | The highest phase number among the iteration’s tasks, or 0 when it has none. |
tags |
Vec<String> | The labels of the iteration’s tags. |
task_count |
i64 | How many tasks the iteration holds in all. |
struct PhaseGroup
struct PhaseGroupThe tasks of one phase of an iteration, for the detail page.
| Field | Type | Description |
|---|---|---|
number |
u32 | The phase number; the groups are in ascending phase order. |
tasks |
Vec<IterationTaskRow> | The tasks in this phase. |
fn iteration_board
pub async fn iteration_board(
State(state): State<AppState>,
Path(id): Path<String>,
) -> Result<Html<String>, web::Error>Iteration board page.
Serves GET /iterations/{id}/board.
| Parameter | Type | Description |
|---|---|---|
State(state) |
State<AppState> | the shared server state, for the store connection |
Path(id) |
Path<String> | the iteration’s id or a prefix that names one iteration, from the path |
| returns | Result<Html<String>, web::Error> | The page as HTML. Fails with web::Error::NotFound when no iteration has the id, and with another web::Error when the store or the template fails. An ambiguous or malformed id prefix also fails, with web::Error::Internal. |
fn iteration_board_fragment
pub async fn iteration_board_fragment(
State(state): State<AppState>,
Path(id): Path<String>,
) -> Result<Html<String>, web::Error>Iteration board fragment (for SSE live reload).
Serves GET /iterations/{id}/_board.
| Parameter | Type | Description |
|---|---|---|
State(state) |
State<AppState> | the shared server state, for the store connection |
Path(id) |
Path<String> | the iteration’s id or a prefix that names one iteration, from the path |
| returns | Result<Html<String>, web::Error> | The fragment as HTML. Fails with web::Error::NotFound when no iteration has the id, and with another web::Error when the store or the template fails. An ambiguous or malformed id prefix also fails, with web::Error::Internal. |
fn iteration_detail
pub async fn iteration_detail(
State(state): State<AppState>,
Path(id): Path<String>,
) -> Result<Html<String>, web::Error>Iteration detail page.
Serves GET /iterations/{id}.
| Parameter | Type | Description |
|---|---|---|
State(state) |
State<AppState> | the shared server state, for the store connection |
Path(id) |
Path<String> | the iteration’s id or a prefix that names one iteration, from the path |
| returns | Result<Html<String>, web::Error> | The page as HTML. Fails with web::Error::NotFound when no iteration has the id, and with another web::Error when the store or the template fails. An ambiguous or malformed id prefix also fails, with web::Error::Internal. |
fn iteration_detail_fragment
pub async fn iteration_detail_fragment(
State(state): State<AppState>,
Path(id): Path<String>,
) -> Result<Html<String>, web::Error>Iteration detail fragment (for SSE live reload).
Serves GET /iterations/{id}/_detail.
| Parameter | Type | Description |
|---|---|---|
State(state) |
State<AppState> | the shared server state, for the store connection |
Path(id) |
Path<String> | the iteration’s id or a prefix that names one iteration, from the path |
| returns | Result<Html<String>, web::Error> | The fragment as HTML. Fails with web::Error::NotFound when no iteration has the id, and with another web::Error when the store or the template fails. An ambiguous or malformed id prefix also fails, with web::Error::Internal. |
fn iteration_list
pub async fn iteration_list(
State(state): State<AppState>,
Query(params): Query<IterationListParams>,
) -> Result<Html<String>, web::Error>Iteration list page.
Serves GET /iterations.
| Parameter | Type | Description |
|---|---|---|
State(state) |
State<AppState> | the shared server state, for the store connection |
Query(params) |
Query<IterationListParams> | the query, with the status tab to show |
| returns | Result<Html<String>, web::Error> | The page as HTML. Fails with a web::Error when the store or the template fails. |
fn iteration_list_fragment
pub async fn iteration_list_fragment(
State(state): State<AppState>,
Query(params): Query<IterationListParams>,
) -> Result<Html<String>, web::Error>Iteration list fragment (for SSE live reload).
Serves GET /iterations/_list.
| Parameter | Type | Description |
|---|---|---|
State(state) |
State<AppState> | the shared server state, for the store connection |
Query(params) |
Query<IterationListParams> | the query, with the status tab to show |
| returns | Result<Html<String>, web::Error> | The fragment as HTML. Fails with a web::Error when the store or the template fails. |
fn build_iteration_rows
async fn build_iteration_rows(
conn: &Connection,
iterations: Vec<iteration::Model>,
) -> Result<Vec<IterationRow>, web::Error>Build the enriched iteration rows for a page of iterations, batching tag lookups into a single query.
The task counts and the highest phase are still one query each per iteration.
| Parameter | Type | Description |
|---|---|---|
conn |
&Connection | the store connection |
iterations |
Vec<iteration::Model> | the iterations to show, in order |
| returns | Result<Vec<IterationRow>, web::Error> | One row for each iteration, in the same order. Fails with a web::Error when a store query fails. |
fn load_iteration_board
async fn load_iteration_board(state: &AppState, id: &str) -> Result<IterationBoardData, web::Error>Load the shared iteration board payload used by both the full page and the fragment handler.
Tasks with status in-progress, done or cancelled go to those columns; any other status goes to the open
column.
| Parameter | Type | Description |
|---|---|---|
state |
&AppState | the shared server state, for the store connection |
id |
&str | the iteration’s id or a prefix that names one iteration |
| returns | Result<IterationBoardData, web::Error> | The iteration and its tasks by column. Fails with web::Error::NotFound when no iteration has the id, and with another web::Error when the store fails. An ambiguous or malformed id prefix also fails, with web::Error::Internal. |
fn load_iteration_detail
async fn load_iteration_detail(
state: &AppState,
id: &str,
) -> Result<IterationDetailData, web::Error>Load the shared iteration detail payload used by both the full page and the fragment handler.
| Parameter | Type | Description |
|---|---|---|
state |
&AppState | the shared server state, for the store connection |
id |
&str | the iteration’s id or a prefix that names one iteration |
| returns | Result<IterationDetailData, web::Error> | The iteration with its rendered description, tags, phases, counts and timeline. Fails with web::Error::NotFound when no iteration has the id, and with another web::Error when the store or the timeline fails. |
fn load_iteration_list
async fn load_iteration_list(
state: &AppState,
status: Option<String>,
) -> Result<IterationListData, web::Error>Load the shared iteration list payload (rows, counts, current status filter) used by both the full page and the fragment handler.
| Parameter | Type | Description |
|---|---|---|
state |
&AppState | the shared server state, for the store connection and the project id |
status |
Option<String> | the status tab from the query, or None for all |
| returns | Result<IterationListData, web::Error> | The rows for the tab and the count of iterations in each status. Fails with a web::Error when a store query fails. |