| 1 | package App::SD::CLI::Command::Help::Tickets; | ||
| 2 | use Any::Moose; | ||
| 3 | extends 'App::SD::CLI::Command::Help'; | ||
| 4 | |||
| 5 | sub run { | ||
| 6 | my $self = shift; | ||
| 7 | $self->print_header('Creating and Updating tickets'); | ||
| 8 | my ${cmd}= $self->cli->get_script_name; | ||
| 9 | |||
| 10 | print <<EOF | ||
| 11 | ${cmd}ticket create | ||
| 12 | Invokes a text editor with a ticket creation template. | ||
| 13 | Note that 'new' is an alias for 'create'. | ||
| 14 | |||
| 15 | ${cmd}ticket create --verbose | ||
| 16 | ${cmd}ticket create -v | ||
| 17 | Invokes a text editor with a ticket creation template | ||
| 18 | and also shows descriptions and valid values for | ||
| 19 | properties. | ||
| 20 | |||
| 21 | ${cmd}ticket create -- summary="This is a summary" status=open | ||
| 22 | Create a new ticket non-interactively. | ||
| 23 | |||
| 24 | ${cmd}ticket update 123 -- status=closed | ||
| 25 | Sets the status of the ticket with local id 123 to closed. | ||
| 26 | Note that 'edit' is an alias for 'update'. | ||
| 27 | |||
| 28 | ${cmd}ticket update 123 | ||
| 29 | Interactively update the ticket with local id 123 in a text | ||
| 30 | editor. | ||
| 31 | |||
| 32 | ${cmd}ticket update 123 --verbose | ||
| 33 | ${cmd}ticket update 123 -v | ||
| 34 | Interactively update the ticket with local id 123 in a text | ||
| 35 | editor and show descriptions and valid values for props. | ||
| 36 | |||
| 37 | ${cmd}ticket update 123 --all-props | ||
| 38 | ${cmd}ticket update 123 -a | ||
| 39 | Interactively update the ticket with local id 123 in a text | ||
| 40 | editor, presenting all the props of the record for editing instead of | ||
| 41 | just those specified by the database setting 'common_ticket_props' | ||
| 42 | (or local configuration variable 'common_ticket_props' if it exists). | ||
| 43 | |||
| 44 | ${cmd}ticket update fad5849a-67f1-11dd-bde1-5b33d3ff2799 -- status=closed | ||
| 45 | Sets the status of the ticket with uuid | ||
| 46 | fad5849a-67f1-11dd-bde1-5b33d3ff2799 to closed. | ||
| 47 | |||
| 48 | ${cmd}ticket take 123 | ||
| 49 | Sets the owner of ticket 123 to you (your email address is taken | ||
| 50 | from either the 'email_address' local config variable or the | ||
| 51 | EMAIL environmental variable). An alias of 'take' is 'claim'. | ||
| 52 | |||
| 53 | ${cmd}ticket give 123 nobody\@example.com | ||
| 54 | Sets the owner of ticket 123 to nobody\@example.com. | ||
| 55 | An alias of 'give' is 'assign'. | ||
| 56 | |||
| 57 | ${cmd}ticket resolve 123 | ||
| 58 | ${cmd}ticket close 123 | ||
| 59 | Sets the status of the ticket with local id 123 to closed. | ||
| 60 | |||
| 61 | ${cmd}ticket resolve 123 --edit | ||
| 62 | ${cmd}ticket resolve 123 -e | ||
| 63 | Sets the status of the ticket with local id 123 to closed, | ||
| 64 | allowing you to edit any properties in an editor and | ||
| 65 | optionally add a comment in the process. | ||
| 66 | EOF | ||
| 67 | |||
| 68 | } | ||
| 69 | |||
| 70 | __PACKAGE__->meta->make_immutable; | ||
| 71 | no Any::Moose; | ||
| 72 | |||
| 73 | 1; | ||
| 74 |