pub enum ProjectCommand {
Create {
name: String,
description: Option<String>,
status: Option<String>,
lead: Option<String>,
start_date: Option<String>,
due_date: Option<String>,
},
Edit {
reference: String,
name: Option<String>,
description: Option<String>,
status: Option<String>,
lead: Option<String>,
start_date: Option<String>,
due_date: Option<String>,
},
List,
Show {
reference: String,
},
Delete {
reference: String,
yes: bool,
},
Add {
reference: String,
issues: Vec<String>,
},
Remove {
reference: String,
issues: Vec<String>,
},
BulkAdd {
reference: String,
issues: Vec<String>,
},
}Expand description
The tix project subcommands (mission first-class-projects-01M3BYBW, WP05).
A required subcommand, like tix milestone and tix cycle: tix project
alone is a usage error, not a listing, because guessing which of ten verbs the
user meant is worse than asking.
Selection is by the stable id (the registry key); a name is accepted as a
convenience and resolves to the same project, since tix.toml guarantees the
names are unique.
Variants§
Create
Create a project and allocate a stable id
The name is a display label, not the identity: it can be changed later with
tix project edit --name, and every issue association survives because the
issues reference the id.
Fields
Edit
Edit a project’s fields; a rename changes the label only
Nothing is re-keyed: the id stays, so every association and every derived
figure is untouched. An optional text flag with a blank value clears it
(--lead ""), the same convention tix edit uses.
Fields
List
List projects in declaration order, with ids and member counts
Show
Show one project’s record and its members
Delete
Delete a project’s registry entry (its issues are never deleted)
The issues that referenced the project keep their references; the report names them so the dangling references can be repaired deliberately.
Fields
Add
Associate one or more issues with a project
Each selector is processed independently: a rejection on one is reported and does not abort the rest.
Fields
Remove
Dissociate one or more issues from a project
Drops only the association; no issue is deleted, and each selector is processed independently.
A reference that does not name a live project is used verbatim, because
removing a retained stale id is the repair path a project deletion leaves
open (C-005). A typo that matches nothing is therefore an inert no-op that
reports 0 changed, not a refusal — which is the one place this differs
from tix edit <issue> --remove-project <id>, where an unknown reference the
issue does not carry is refused as unknown_project.
Fields
BulkAdd
Bulk-associate one or more issues with a project
Project association only — general bulk editing is a different feature. Every selector is processed independently and every outcome is reported, so one unknown selector does not discard the associations that succeeded.
An unknown project reference refuses the whole command before anything
is written (all entries then fail with unknown_project); use
tix project remove to drop a retained stale id, whose reference is matched
verbatim and reported as 0 changed rather than refused.
Trait Implementations§
Source§impl FromArgMatches for ProjectCommand
impl FromArgMatches for ProjectCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ProjectCommand
impl Subcommand for ProjectCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for ProjectCommand
impl RefUnwindSafe for ProjectCommand
impl Send for ProjectCommand
impl Sync for ProjectCommand
impl Unpin for ProjectCommand
impl UnsafeUnpin for ProjectCommand
impl UnwindSafe for ProjectCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more