| 1 | [[PageOutline(2-5,Contents,pullout)]] |
| 2 | |
| 3 | = New Ticket Like This = |
| 4 | |
| 5 | == Description == |
| 6 | |
| 7 | The NewTicketLikeThisPlugin adds a "Clone" button to existing tickets, |
| 8 | which lets you create a new ticket whose fields derive from the original |
| 9 | ticket if you have the appropriate permission. |
| 10 | |
| 11 | It is based on the tracopt.ticket.clone.ticketclonebutton extension that |
| 12 | ships with Trac core. Unlike that extension, the NewTicketLikeThisPlugin |
| 13 | defines and consumes a pluggable interface for implementing custom policies |
| 14 | to determine the way in which a new ticket is derived from the original. |
| 15 | This allows flexible, customized business logic to be provided based on |
| 16 | the needs and workflows of your team. Also, the NewTicketLikeThisPlugin |
| 17 | allows you to configure the permission required to clone a ticket, whereas |
| 18 | the core ``ticketclonebutton`` hard-codes the TICKET_ADMIN permission. |
| 19 | |
| 20 | Two policies are provided by default, in the ``newticketlikethis.policies`` |
| 21 | module: |
| 22 | |
| 23 | * ``SimpleTicketCloner`` mimics the behavior of the |
| 24 | ``core tracopt.ticket.clone.ticketclonebutton`` extension: all fields |
| 25 | from the original ticket are cloned, and the "summary" and "description" |
| 26 | fields are modified to denote the ticket that they were cloned from. |
| 27 | |
| 28 | * ``ExcludedFieldsTicketCloner`` clones all fields from the original ticket |
| 29 | with no modifications. It can also ignore certain fields entirely, |
| 30 | based on a configuration setting, which will force the new ticket to be |
| 31 | generated with the system's default values (or no values) for the fields |
| 32 | that were excluded. |
| 33 | |
| 34 | More complex policies might implement custom logic for deriving new ticket |
| 35 | values based on the values of the existing ticket's fields, or use |
| 36 | alternate cloning policies based on the ticket's type. |
| 37 | |
| 38 | |
| 39 | == Bugs/Feature Requests == |
| 40 | |
| 41 | Existing bugs and feature requests for NewTicketLikeThisPlugin are |
| 42 | [report:9?COMPONENT=NewTicketLikeThisPlugin here]. |
| 43 | |
| 44 | If you have any issues, create a |
| 45 | [http://trac-hacks.org/newticket?component=NewTicketLikeThisPlugin&owner=ejucovy new ticket]. |
| 46 | |
| 47 | == Download == |
| 48 | |
| 49 | Download the zipped source from [download:newticketlikethisplugin here]. |
| 50 | |
| 51 | == Source == |
| 52 | |
| 53 | You can check out NewTicketLikeThisPlugin from [http://trac-hacks.org/svn/newticketlikethisplugin here] using Subversion, or [source:newticketlikethisplugin browse the source] with Trac. |
| 54 | |
| 55 | == Example == |
| 56 | |
| 57 | To use the plugin, install it in your Trac environment and enable its |
| 58 | components in ``trac.ini``:: |
| 59 | |
| 60 | [components] |
| 61 | newticketlikethis.* = enabled |
| 62 | |
| 63 | By default this will add the "Clone" button to the ticket view, and |
| 64 | will use the ``SimpleTicketCloner`` component to clone your tickets. |
| 65 | The ``TICKET_ADMIN`` permission will be required for cloning tickets. |
| 66 | |
| 67 | |
| 68 | == Recent Changes == |
| 69 | |
| 70 | [[ChangeLog(newticketlikethisplugin, 3)]] |
| 71 | |
| 72 | == Author/Contributors == |
| 73 | |
| 74 | '''Author:''' [wiki:ejucovy] [[BR]] |
| 75 | '''Maintainer:''' [wiki:ejucovy] [[BR]] |
| 76 | '''Contributors:''' |