meta data de esta página
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
aplicaciones:rt:funcionamiento [2010/05/05 12:23] – lc | aplicaciones:rt:funcionamiento [2023/01/18 14:36] (actual) – editor externo 127.0.0.1 | ||
---|---|---|---|
Línea 41: | Línea 41: | ||
=== Definiendo la plantilla === | === Definiendo la plantilla === | ||
- | Lo primero que necesitamos es crear una plantilla local a la cola | + | Lo primero que necesitamos es crear una plantilla local a la cola que hemos creado (en mi caso compras) |
{{: | {{: | ||
y definir su contenido como esto: | y definir su contenido como esto: | ||
- | {{: | + | {{: |
+ | Las dependencias entre el ticket creado y el ticket de aprobación hace necesario que este último deba ser cerrado primero. | ||
+ | === Creamos la acción === | ||
+ | Creamos una acción dentro de la cola compras para que al crear un nuevo ticket automáticamente se cree un ticket de aprobación | ||
- | The dependencies between the tickets will force the Approval ticket to be closed before the original ticket can be written off. | + | Vamos a la cola compras-> |
- | Approvals Notification And Permissions | + | |
- | If you want different groups of people to have access to different sets of approvals, you will need to set up a few new Queues. No Ticket of type " | + | Descripción: |
+ | Condición: On Create | ||
+ | Acción: Create Tickets | ||
+ | Plantilla: Aprobar comprar (la plantilla creada anteriormente) | ||
+ | Fase: TransactionCreate | ||
- | Note that if you're using the default ___Approvals Queue for your approvals, you'll need to give the people who are to approve things permissions to see tickets in this queue (which you can only do by granting Global permissions.) You'll want to grant ShowTicket to AdminCC' | ||
- | Example using PO Requisition Approvals | ||
- | Create a PO-Req queue for PO Requisitions.. this is where the tickets get created which need approval. Enable this queue and add users who are allowed to submit PO Requisitions to this queue with necessary permissions. | + | ==== Aprobaciones Notificaciones y Permisos ==== |
- | Create the following template named " | + | Si necesitas diferentes grupos de usuarios para acceder a diferentes conjuntos de aprobaciones, |
- | ===Create-Ticket: | + | <note tip> Los ticket del tipo aprobación no aparecen en la lista de ticets normales, aparecen al pinchar sobre la opción Aprobación </ |
- | Subject: Approve purchase order for {$Tickets{' | + | |
- | Depended-On-By: | + | |
- | Queue: Approvals-PO | + | |
- | Type: approval | + | |
- | Owner: username-of-owner | + | |
- | Content: Someone has created a purchase requisition. | + | |
- | ENDOFCONTENT | + | |
+ | <note warning> | ||
+ | </ | ||
- | If you want multiple approvals, just add more " | + | También deberás dar permisos para ver los tickets **ShowTicket** a los AdminCC |
- | and the following Scrip: | + | En AdminCC de la cola Approvals ponemos lo usuarios o grupos que sean los responsables de aprobar los tickets. |
- | Description: | + | Para añadir mediante scripts un grupo para aprobar las peticiones, tenemos que modificar la plantilla |
- | Condition: On Create | + | < |
- | Action: Create Tickets | + | ===Create-Ticket: |
- | Template: Create Approval | + | Subject: Aprobar comprar de {$Tickets{' |
- | Stage: TransactionCreate | + | Depended-On-By: TOP |
- | + | Queue: | |
- | + | Type: approval | |
- | Create queue Approvals-PO, and copy the templates and scrips from the [__]Approvals queue. | + | AdminCC: { |
- | + | my $group_name | |
- | You could do this in Mysql with commands such as: | + | |
- | + | ||
- | insert into Scrips (Queue, Description, | + | |
- | CustomPrepareCode, | + | |
- | Description, | + | |
- | CustomCommitCode, | + | |
- | + | ||
- | insert into Templates (Queue, Name, Description, | + | |
- | Created) select NEWQUEUENUM, | + | |
- | Created from Templates where Queue=2; | + | |
- | + | ||
- | + | ||
- | Set the Reply Address and Comment Address to the email address of the "PO-Req" queue. This just makes sense. | + | |
- | + | ||
- | Enable this queue and add as AdminCCs the user(s) you wish to be the Approver(s). | + | |
- | + | ||
- | In the scrip for "When an approval ticket is created..." | + | |
- | + | ||
- | The " | + | |
- | + | ||
- | There you have it. Hope this helps. | + | |
- | Group Approvals | + | |
- | + | ||
- | Sometimes you want to create tickets so that any one person from a group can approve it. One way to do that is as follows: | + | |
- | + | ||
- | Create a group that contains the list of users that can approve. In the Approval template, add an AdminCC field. This will contain the group, but you cannot just list the group name, unfortunately; | + | |
- | + | ||
- | | + | |
- | my $group_name | + | |
my $groups | my $groups | ||
Línea 122: | Línea 92: | ||
| | ||
} | } | ||
+ | Content: Alguien ha creado un ticket que debe se aprobado o rechazado | ||
+ | ENDOFCONTENT | ||
+ | </ | ||
+ | También podemos definir una acción en la cola Approvals para cambiar el estado del ticket padre si el ticket de aprobación es rechazado. Para ello vamos a la cola Approvals y creamos una nueva acción con lo siguiente: | ||
- | This inserts the ID of the group named "Group Name" in the AdminCC field. Be sure to replace the group named "Group Name" with the appropriate name of your group. | + | {{:aplicaciones:rt: |
- | + | ||
- | Now you need to modify permissions for the Queue that contains the Approval so that the AdminCC role can approve it. | + | |
- | + | ||
- | Now when you create a ticket with approvals, the approval will show the group name and all of its members in the AdminCC field, and anyone listed there can approve that ticket. If the user that approves it also takes it, then you can easily see in the original ticket' | + | |
- | + | ||
- | Condition: On Resolve | + | |
- | Action: User Defined | + | |
- | Template: Global Template: Blank | + | |
- | Stage: Transaction Create | + | |
- | Custom Action Preparation Code: | + | |
- | my $Actor = $self-> | + | |
- | if( $Actor != $self-> | + | |
- | $RT::Logger-> | + | |
- | + | ||
- | my ($status, $msg) = $self-> | + | |
- | unless( $status ) { | + | |
- | die " | + | |
- | | + | |
- | | + | |
- | return( 1 ); | + | |
+ | Si necesitamos dos aprobaciones, | ||
+ | \\ http:// | ||
- | One of the features of doing it this way is that you can continue to have a single Approval queue and different people can approve different tickets since the rights are based on the AdminCC role and not a specific user or group. | + | ==== Delegar ==== |
+ | Para delegar necesitamos los isguientes permisos: | ||
+ | * AdminOwnPersonalGroups | ||
+ | * Delegate Rights | ||
+ | * Ver Grupo | ||
- | http:// | + | y para poder ver los grupos personales que están dentro de las pestaña preferencias hay que tener además el permiso ModifySelf |
+ | ===== Referencias ===== | ||
+ | * http:// | ||
+ | * http:// |