The ls subcommand now shows created_at before uuid
This commit is contained in:
+18
-4
@@ -123,7 +123,11 @@ fn cmd_ls(status_filter: &Option<String>, worklane_dir: &Path) -> Result<()> {
|
||||
let owner = parse_ticket_field(&content, "Owner");
|
||||
let due = parse_ticket_field(&content, "Due");
|
||||
let filename = e.path().file_stem()?.to_string_lossy().to_string();
|
||||
let uuid_short = if filename.len() > 7 { &filename[..7] } else { &filename };
|
||||
let uuid_short = if filename.len() > 7 {
|
||||
&filename[..7]
|
||||
} else {
|
||||
&filename
|
||||
};
|
||||
let created_at = parse_ticket_field(&content, "Created At");
|
||||
let short_date = format_created_at(&created_at);
|
||||
|
||||
@@ -138,7 +142,10 @@ fn cmd_ls(status_filter: &Option<String>, worklane_dir: &Path) -> Result<()> {
|
||||
if ts.is_empty() {
|
||||
println!(" ({}) {} | Owner: {} | Due: {}", uuid, title, owner, due);
|
||||
} else {
|
||||
println!(" ({}:{}) {} | Owner: {} | Due: {}", uuid, ts, title, owner, due);
|
||||
println!(
|
||||
" {} ({}) {} | Owner: {} | Due: {}",
|
||||
ts, uuid, title, owner, due
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -179,7 +186,11 @@ fn cmd_ls(status_filter: &Option<String>, worklane_dir: &Path) -> Result<()> {
|
||||
let owner = parse_ticket_field(&content, "Owner");
|
||||
let due = parse_ticket_field(&content, "Due");
|
||||
let filename = e.path().file_stem()?.to_string_lossy().to_string();
|
||||
let uuid_short = if filename.len() > 7 { &filename[..7] } else { &filename };
|
||||
let uuid_short = if filename.len() > 7 {
|
||||
&filename[..7]
|
||||
} else {
|
||||
&filename
|
||||
};
|
||||
let created_at = parse_ticket_field(&content, "Created At");
|
||||
let short_date = format_created_at(&created_at);
|
||||
|
||||
@@ -192,7 +203,10 @@ fn cmd_ls(status_filter: &Option<String>, worklane_dir: &Path) -> Result<()> {
|
||||
if ts.is_empty() {
|
||||
println!(" ({}) {} | Owner: {} | Due: {}", uuid, title, owner, due);
|
||||
} else {
|
||||
println!(" ({}:{}) {} | Owner: {} | Due: {}", uuid, ts, title, owner, due);
|
||||
println!(
|
||||
" {} ({}) {} | Owner: {} | Due: {}",
|
||||
ts, uuid, title, owner, due
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user