pub struct Issue {Show 13 fields
pub id: String,
pub project_id: String,
pub author_id: String,
pub title: String,
pub description: String,
pub status: IssueStatus,
pub priority: Priority,
pub position: i64,
pub effort: Option<i64>,
pub assignee_id: Option<String>,
pub parent_issue_id: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Fields§
§id: String§project_id: String§title: String§description: String§status: IssueStatus§priority: Priority§position: i64§effort: Option<i64>Effort estimate in story points. None means the issue has not
been estimated yet — this is the default for newly created
issues and for issues that existed before estimation was
introduced. The DB CHECK constraint guarantees Some(n) always
holds n > 0.
assignee_id: Option<String>User the issue is assigned to. None is “unassigned” — a
normal state for backlog items. The DB foreign key uses
ON DELETE SET NULL so removing a user does not cascade-delete
their issues; ownership simply returns to the pool.
parent_issue_id: Option<String>Parent issue id when this row is a sub-issue (Phase C
PR1, peisear-feature-spec-v2.1 §8.3). None means
“this is a top-level issue” — the common case.
Constraints (enforced by triggers in migration 0015):
- The parent must be top-level itself; sub-issues cannot have sub-issues (one level only).
- The parent must be in the same project.
- An issue cannot be its own parent, transitively or directly.
- An issue with existing children cannot be demoted into being a sub-issue itself (would create a 2- level chain).
Sub-issues inherit nothing automatically: assignee, status, priority, effort, and sprint membership are all independently settable. The one effective tie is “parent’s sprint determines the sub-issue’s sprint” — a UI-level rule (sub-issues don’t get their own sprint row in the planning surface) rather than a schema constraint.
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl Issue
impl Issue
Sourcepub fn is_sub_issue(&self) -> bool
pub fn is_sub_issue(&self) -> bool
True if this issue is a sub-issue of another. Convenience over checking the field directly so calling sites read like prose (“if issue.is_sub_issue() { … }”).
Sourcepub fn is_top_level(&self) -> bool
pub fn is_top_level(&self) -> bool
True if this issue is at the top level of the
hierarchy. The complement of is_sub_issue. Top-level
issues are the only ones rendered on the kanban board,
the project list, and the sprint plan view; sub-issues
appear inline in their parent’s detail page (§8.5).