Skip to main content

TicketChange

Enum TicketChange 

Source
pub enum TicketChange {
    Priority {
        old: String,
        new: String,
    },
    Status {
        old: String,
        new: String,
    },
    Assignee {
        old: String,
        new: String,
    },
    Version {
        old: String,
        new: String,
    },
    DoneRatio {
        old: String,
        new: String,
    },
}
Expand description

Represents a single field change detected between two versions of a LinkedTicket.

§Design

This enum is the only place in the codebase where “which fields are trackable” is declared. Adding a new tracked field (e.g. Sprint, DoneRatio) only requires:

  1. Adding a variant here.
  2. Adding a match arm in LinkedTicket::diff.
  3. Handling the new variant in the orchestrator’s notification dispatch.

The orchestrator (gitlab-tracker) and notification plugin (gitlab-tracker-notify) never need to know about field names directly — they only receive TicketChange values. This satisfies OCP: providers (Redmine, Jira, …) and consumers (app, notify) are decoupled from the field enumeration.

Variants§

§

Priority

The priority label changed (e.g. “Normal” → “High”).

Fields

§

Status

The status label changed (e.g. “In Progress” → “Resolved”).

Fields

§

Assignee

The assignee changed (e.g. “Alice” → “Bob”, or “Unassigned” when empty).

Fields

§

Version

The target version/release changed (e.g. “v1.2” → “v1.3”, or “None” when unset).

Fields

§

DoneRatio

The completion percentage changed (0–100). Fires on both increase and decrease. old and new are formatted as “N%” strings for display consistency.

Fields

Implementations§

Source§

impl TicketChange

Source

pub fn field_label(&self) -> &'static str

Returns a human-readable label for the changed field, suitable for notification summaries.

Source

pub fn before_after(&self) -> (&str, &str)

Returns the before/after values as (&str, &str) for display purposes.

Trait Implementations§

Source§

impl Clone for TicketChange

Source§

fn clone(&self) -> TicketChange

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 TicketChange

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TicketChange

Source§

fn eq(&self, other: &TicketChange) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TicketChange

Auto Trait Implementations§

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.