Strange things with RT 3.8.2 Approval system

Hello,

I have a problem with the approval system in RT 3.8.2. I want tickets
to get approved by two users.

This is exactly what I did :

  • Default installation of RT 3.8.2
  • Creation of two users, USER1 and USER2, privileged.
  • New group with these two users MYPROJECT_APPROVERS
  • Creation of a queue MYPROJECT_APPROVAL
    → with a new template : approval_template (from Wiki/Oreilly book)

BEGIN

===Create-Ticket: approval_MYPROJECT_1
Depended-On-By: TOP
Queue: ___Approvals
Owner: USER1
Type: approval
Content: Someone has created a ticket. you should review and approve
it, so they can finish their work
ENDOFCONTENT

===Create-Ticket: approval_MY_PROJECT_2
Depended-On-By: TOP
Queue: ___Approvals
Owner: USER2
Type: approval
Content: Someone has created a ticket. you should review and approve
it, so they can finish their work
ENDOFCONTENT

END

→ with a new scrip : approval_scrip

BEGIN

Condition : On Create
Action : Create Tickets
Template : approval_template
Stage : TransactionCreate

END

  • Enable ___Approval queue
  • Add rights OwnTicket and ShowTicket on ___Approval queue for
    MYPROJECT_APPROVERS group
  • Add rights CreateTicket,ReplyToTicket,SeeQueue,ShowTicket on
    MYPROJECT_APPROVAL queue for MYPROJECT_APPROVERS group

This is the behaviour of this configuration :

SCENARIO 1

  • when user “root” (for instance) creates a ticket in
    MYPROJECT_APPROVAL queue, a ticket is created with two tickets in the
    “Depends on” section. One belongs to USER1, the other one to USER2.
    Each user receives an email with this content :

BEGIN

Greetings,

There is a new item pending your approval: “Approval for test12”,
a summary of which appears below.

Please visit http://xxxxx.xx.com/Approvals/Display.html?id=31
to approve or reject this ticket, or http://xxxxx.xx.com/Approvals/ to
batch-process all your pending approvals.

Someone has created a ticket. you should review and approve it, so
they can finish their work

END

  • if one of the user logs in in the interface, he sees the ticket to
    be approved in the approval section, no problem. Let’s says he
    approves it. The requestor (only) receives this email :

BEGIN

Greetings,

Your ticket has been approved by USER1.
Other approvals may be pending.

Approver’s notes: Ok for USER1

END

  • the other user logs in and approves the ticket and the requestor
    receives this email :

BEGIN

Greetings,

Your ticket has been approved by USER2.
Its Owner may now start to act on it.

Approver’s notes: OK for USER2

END

Remarks at the end of this scenario:

  • I think the other approvers should receive a notification that the
    ticket has been approved by one of them : do I have to add the
    MYPROJECT_APPROVERS as admincc of the queue ? If I do this, standard
    scrip will be applied, should I remove some of them ?
  • The two emails are not exactly the same : one saying other approvals
    may be pending, the other saying all of them are approved: how can I
    send an email when the request is partially approved, and another
    email once all the approvals are done ? For example, emails “Approved
    by USER1”, “Approved by USER2”, “Approved by all the approvers”
  • There is a comment in the email content saying “a summary of which
    appears below.” which is false. How can make it true ?

SCENARIO 2

  • If the first user rejects the email, the requestor receives this :

BEGIN

Greetings,

Your ticket has been rejected by USER1.

Approver’s notes:

END

  • The ticket is switched from open to rejected.

  • The second user, who sees it has been rejected but still see it in
    his approval section, can approve it. The requestor receives this
    email :

BEGIN

Greetings,

Your ticket has been approved by USER2.
Its Owner may now start to act on it.

Approver’s notes: yes

END

  • And the ticket switches back from rejected to open.

Remarks at the end of this scenario :

  • Why is the comment of the USER1 rejecting the ticket is missing ?
    USER1 did a comment in the web interface but it doesn’t appear neither
    in the email nor in the web ticket log.
  • IMO, it shouldn’t be possible to approve a ticket once it has been
    rejected by one of the approvers. Moreover, there is in the email “Its
    Owner may now start to act on it.” which is not true.

Maybe these problems are related to my configuration, so is my
configuration correct ? Do I use the approval system how it’s designed
to be used ?

Thanks!
LB

Hi,

L B <bertignac gmail.com> writes:

##################

SCENARIO 1

##################
Remarks at the end of this scenario:

  • I think the other approvers should receive a notification that the
    ticket has been approved by one of them : do I have to add the
    MYPROJECT_APPROVERS as admincc of the queue ? If I do this, standard
    scrip will be applied, should I remove some of them ?

see if it works if you add user2 to the cc of the approval scrip template for
user1, and vice versa for user1 in template for user2.

  • The two emails are not exactly the same : one saying other approvals
    may be pending, the other saying all of them are approved: how can I
    send an email when the request is partially approved, and another
    email once all the approvals are done ? For example, emails “Approved
    by USER1”, “Approved by USER2”, “Approved by all the approvers”

In RT::Approval::Rule::Passed, the partially approved and all approved cases are
simply using different templates (‘Approval Passed’ and ‘All Approvals Passed’,
respectively). I don’t think the workflow currently supporting sending both
types of mails in the last approval that triggers complete approval.

  • There is a comment in the email content saying “a summary of which
    appears below.” which is false. How can make it true ?

The section is the “Content” part in your template. you can use strings such as
{$Tickets{“TOP”}->Subject} to refer to the subject of the ticket to be approved
in the template.

##################

SCENARIO 2

##################

  • Why is the comment of the USER1 rejecting the ticket is missing ?
    USER1 did a comment in the web interface but it doesn’t appear neither
    in the email nor in the web ticket log.
  • IMO, it shouldn’t be possible to approve a ticket once it has been
    rejected by one of the approvers. Moreover, there is in the email “Its
    Owner may now start to act on it.” which is not true.

Maybe these problems are related to my configuration, so is my
configuration correct ? Do I use the approval system how it’s designed
to be used ?

I believe these are bugs. I can take a look later.

Cheers,
CLK

Will this be fixed in RT 3.8.3 (may I ask when :slight_smile: ) ? Does your
RT-Workflow extension work correctly even with these bugs ? I had this
working in RT 3.6.6, we did the migration, and now some users complain
because it’s broken :-/
L.B.