Skip to main content

Issue

Struct Issue 

Source
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§author_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

Source

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() { … }”).

Source

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).

Trait Implementations§

Source§

impl Clone for Issue

Source§

fn clone(&self) -> Issue

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Issue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Issue

§

impl RefUnwindSafe for Issue

§

impl Send for Issue

§

impl Sync for Issue

§

impl Unpin for Issue

§

impl UnsafeUnpin for Issue

§

impl UnwindSafe for Issue

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.