| 1 | package App::SD::CLI::Command::Help::Search; | ||
| 2 | use Any::Moose; | ||
| 3 | extends 'App::SD::CLI::Command::Help'; | ||
| 4 | |||
| 5 | sub run { | ||
| 6 | my $self = shift; | ||
| 7 | $self->print_header('Searching for and displaying tickets'); | ||
| 8 | my ${cmd}= $self->cli->get_script_name; | ||
| 9 | |||
| 10 | print <<EOF | ||
| 11 | |||
| 12 | ${cmd}ticket search | ||
| 13 | List all tickets with a status that does not match 'closed'. | ||
| 14 | Note that 'list' is an alias for 'search'. | ||
| 15 | |||
| 16 | ${cmd}ticket search --regex abc | ||
| 17 | List all tickets with content (in any property) matching 'abc'. Regular | ||
| 18 | expressions are Perl regexes. | ||
| 19 | |||
| 20 | ${cmd}ticket search -- status!=closed summary =~ http | ||
| 21 | List all tickets with a status property that does not match closed and a | ||
| 22 | summary matching 'http'. | ||
| 23 | |||
| 24 | ${cmd}ticket search --group owner | ||
| 25 | ${cmd}ticket search -g owner | ||
| 26 | List all tickets with a status property that does not match 'closed', | ||
| 27 | grouped by owner. | ||
| 28 | |||
| 29 | ${cmd}ticket search --sort due | ||
| 30 | ${cmd}ticket search -s due | ||
| 31 | List all tickets with a status property that does not match 'closed', | ||
| 32 | sorted by due date. | ||
| 33 | |||
| 34 | ${cmd}ticket basics 1234 | ||
| 35 | Show basic information (metadata only) for the ticket with local id 1234. | ||
| 36 | |||
| 37 | ${cmd}ticket show 1234 | ||
| 38 | Show basic information and history and list attachments for the ticket | ||
| 39 | with local id 1234. | ||
| 40 | |||
| 41 | ${cmd}ticket details 1234 | ||
| 42 | Show basic information, comments, and history, and list attachments for | ||
| 43 | the ticket with local id 1234. | ||
| 44 | |||
| 45 | ${cmd}ticket show 1234 --all-props | ||
| 46 | ${cmd}ticket show 1234 -a | ||
| 47 | Show all properties of the given ticket, even if they aren't in | ||
| 48 | the database setting common_ticket_props (or local configuration | ||
| 49 | variable 'ticket.common_props' if it exists). | ||
| 50 | |||
| 51 | ${cmd}ticket show 1234 --skip-history | ||
| 52 | ${cmd}ticket show 1234 -s | ||
| 53 | Show only metadata and a list of attachments for the ticket 1234 (but | ||
| 54 | not history). | ||
| 55 | |||
| 56 | ${cmd}ticket show 1234 --with-history | ||
| 57 | ${cmd}ticket show 1234 -h | ||
| 58 | Override the ticket.no-implicit-history-display config option if it is | ||
| 59 | set for this replica. (See '${cmd}help config' for more info.) | ||
| 60 | |||
| 61 | ${cmd}ticket history 1234 | ||
| 62 | Show history for the ticket with local id 1234. | ||
| 63 | |||
| 64 | ${cmd}ticket delete 1234 | ||
| 65 | Delete ticket with local id 1234. | ||
| 66 | EOF | ||
| 67 | |||
| 68 | } | ||
| 69 | |||
| 70 | __PACKAGE__->meta->make_immutable; | ||
| 71 | no Any::Moose; | ||
| 72 | |||
| 73 | 1; | ||
| 74 |