meta data de esta página
  •  

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
aplicaciones:rt:funcionamiento [2010/05/05 12:24] lcaplicaciones: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)
 {{:aplicaciones:rt:rtplantilla.png?700|}} {{:aplicaciones:rt:rtplantilla.png?700|}}
  
Línea 47: Línea 47:
 {{:aplicaciones:rt:rtplantilla2.png?700|}} {{:aplicaciones:rt:rtplantilla2.png?700|}}
  
 +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->Acciones ->Nueva acción:
-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 "Approval" will appear in the normal ticket lists, but tickets of this type from any Queue will be shown on the Approvals page. By managing your permissions, you can set up Approval systems for various organisational departments.+Descripción: crear aprobació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's (which ever role your template attaches the approving group to the approval ticket as) 
-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 "Create Approval":+Si necesitas diferentes grupos de usuarios para acceder a diferentes conjuntos de aprobaciones, necesitas crear nuevas colas.
  
-===Create-Ticket: poreq +<note tip> Los ticket del tipo aprobación no aparecen en la lista de ticets normalesaparecen al pinchar sobre la opción Aprobación </note>
-Subject: Approve purchase order for {$Tickets{'TOP'}->Subject} +
-Depended-On-By: TOP +
-Queue: Approvals-PO  +
-Type: approval +
-Owner: username-of-owner   #note this is so that notifications work properly +
-Content: Someone has created a purchase requisition.  Please review and approve itso they can spend some money. +
-ENDOFCONTENT+
  
 +<note warning>Para utilizar la cola por defecto Approvals para nuestras aprobaciones, hay que activar la cola y dar permisos a los usuarios autorizados a ver la cola y los tickets (sólo se puede hacer dando permisos Globales.)
 +</note>
  
-If you want multiple approvals, just add more "===Create-Ticket:" sections+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: Create PO Req approval +Para añadir mediante scripts un grupo para aprobar las peticionestenemos que modificar la plantilla (en nuestro casola de aprobación de compras y dejarla como sigue
-Condition: On Create +<file>  
-Action: Create Tickets +===Create-Ticket: compras 
-Template: Create Approval +Subject: Aprobar comprar de {$Tickets{'TOP'}->Subject} 
-Stage: TransactionCreate +Depended-On-By: TOP 
- +Queue: Approvals 
- +Typeapproval 
-Create queue Approvals-POand copy the templates and scrips from the [__]Approvals queue. (Leave the [__]Approvals queue disabled and its templates unaltered for future reference). If you want an easy way to copy these templates/scrips.. I have none.. it was copy/paste. +AdminCC: { 
- +   my $group_name  = 'grpjefes';
-You could do this in Mysql with commands such as+
- +
-insert into Scrips (Queue, Description, ScripCondition, ScripAction, ConditionRules, ActionRules, CustomIsApplicableCode, +
-CustomPrepareCode, CustomCommitCode, Stage, Template, Creator, Created, LastUpdatedBy, LastUpdated) select NEWQUEUENUM, +
-Description, ScripCondition, ScripAction, ConditionRules, ActionRules, CustomIsApplicableCode, CustomPrepareCode, +
-CustomCommitCode, Stage, Template, Creator, Created, LastUpdatedBy, LastUpdated from Scrips where Queue=2; +
- +
-insert into Templates (Queue, Name, Description, Type, Language, TranslationOf, Content, LastUpdated, LastUpdatedBy, Creator, +
-Created) select NEWQUEUENUM, Name, Description, Type, Language, TranslationOf, Content, LastUpdated, LastUpdatedBy, Creator,  +
-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..." change the following condition from User Defined to "On Create". +
- +
-The "Approval Passed" Template says "Ticket Rejected" in the subject.. please change to "Ticket Approved". The "All Approvals Passed" Template says "Ticket Rejected" in the subject.. please change to "Ticket Approved". +
- +
-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; that would just create an unprivileged user with the same name as the group. You have to list the group's Principal ID. I suppose you could find out what that is manually and enter it directly, but that's not very manageable. Instead, put some Perl code in the field as follows: +
- +
- AdminCC:+
-   my $group_name  = 'Group Name';+
    my $groups      = RT::Groups->new( $RT::SystemUser );    my $groups      = RT::Groups->new( $RT::SystemUser );
  
Línea 122: Línea 92:
    $groups->First->Id;    $groups->First->Id;
 } }
 +Content: Alguien ha creado un ticket que debe se aprobado o rechazado
 +ENDOFCONTENT
 +</file>
  
 +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:rtcambiarpadre.png?700|}}
- +
-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's "Depends On" section who approved it. You can automate this via another scrip. Create the following scrip on the Approval queue: +
- +
-Condition: On Resolve +
-Action: User Defined +
-Template: Global Template: Blank +
-Stage: Transaction Create +
-Custom Action Preparation Code: +
-  my $Actor = $self->TransactionObj->CreatorObj->Id; +
-  if( $Actor != $self->TicketObj->OwnerObj->Id ) { +
-    $RT::Logger->info("Auto assign ticket #"$self->TicketObj->id ." to user #". $Actor ); +
- +
-    my ($status, $msg) = $self->TicketObj->SetOwner( $Actor ); +
-    unless( $status ) { +
-      die "Error: $msg"; +
-    } +
-  } +
-  return( 1 );+
  
 +Si necesitamos dos aprobaciones, pero que una sólo se cree una vez aprobada la primera, entonces podemos utilizar el siguiente script: 
 +\\ http://www.gossamer-threads.com/lists/rt/users/66127?search_string=multiple%20approval;#66127
  
-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://wiki.bestpractical.com/view/ApprovalCreation+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://wiki.bestpractical.com/view/ApprovalCreation
 +  * http://wiki.bestpractical.com/view/OpenDependantsOnResolve