I’m trying to present the fact that new mail from a requestor is present
on a ticket on the user’s start page.
I’ve worked out that the WebRT/html/Elements/MyTickets file needs editing,
and that the property I need to display is the Transaction->IsInbound()
value of the most recent transaction on a ticket.
Here’s where I’m having difficulty though. I can’t work out how to get
the most recent Transaction object from the Transactions object returned
by Ticket->Transactions().
I’m trying to present the fact that new mail from a requestor is present
on a ticket on the user’s start page.
I’ve worked out that the WebRT/html/Elements/MyTickets file needs editing,
and that the property I need to display is the Transaction->IsInbound()
value of the most recent transaction on a ticket.
Here’s where I’m having difficulty though. I can’t work out how to get
the most recent Transaction object from the Transactions object returned
by Ticket->Transactions().
How can I get at it?
Not sure if this is what you’re looking for, but in MyTickets, I did the
following. It adds a ‘Last Updated’ column to the MyTickets table (as you
would see in a Queue listing):
@@ -5,6 +5,7 @@
Subject
Queue
Status
+Updated
% while (my $Ticket = $MyTickets->Next) {
Not sure if this is what you’re looking for, but in MyTickets, I did the
following. It adds a ‘Last Updated’ column to the MyTickets table (as
you would see in a Queue listing):
@@ -5,6 +5,7 @@
Subject
Queue
Status
+Updated
% while (my $Ticket = $MyTickets->Next) {
Thanks - it’s not quite what I need though. I don’t really care when a
ticket was last updated so much as who did the updating. If the last
person to update was a member of our support staff than the ticket doesn’t
need attention. If it was the requestor then the ticket needs reviewing.
TravisOn Mon, Jan 07, 2002 at 06:57:01PM +0000, Daniel Foster wrote:
Thanks - it’s not quite what I need though. I don’t really care when a
ticket was last updated so much as who did the updating. If the last
person to update was a member of our support staff than the ticket doesn’t
need attention. If it was the requestor then the ticket needs reviewing.
$Ticket->IsRequestor($Ticket->LastUpdatedByObj)
This returns true or false depending on if the ticket was last updated by
someone who is a requestor. I don’t know what this will do if there
are multiple requestors listed for a ticket.
Travis
Travis Campbell - Unix Systems Administrator = travis@beast.amd.com
5900 E. Ben White Blvd, Austin, TX 78741 = travis.campbell@amd.com
TEL: (512) 602-1888 PAG: (512) 604-0341 = webmaster@beast.amd.com
“Does anything work as expected?” Yes. An axe through the CPU.
It should return true if that user is any requestor of the ticket :)On Mon, Jan 07, 2002 at 03:28:58PM -0600, Travis Campbell wrote:
Travis
On Mon, Jan 07, 2002 at 06:57:01PM +0000, Daniel Foster wrote:
Thanks - it’s not quite what I need though. I don’t really care when a
ticket was last updated so much as who did the updating. If the last
person to update was a member of our support staff than the ticket doesn’t
need attention. If it was the requestor then the ticket needs reviewing.
$Ticket->IsRequestor($Ticket->LastUpdatedByObj)
This returns true or false depending on if the ticket was last updated by
someone who is a requestor. I don’t know what this will do if there
are multiple requestors listed for a ticket.
This returns true or false depending on if the ticket was last updated by
someone who is a requestor. I don’t know what this will do if there
are multiple requestors listed for a ticket.
This is precisely what I was looking for. Thanks a lot (and thanks for
the multiple requestor confirmation Jesse
By the way - should I submit patches of my changes for future inclusion
anywhere? (Haven’t hacked on RT before)
It should return true if that user is any requestor of the ticket
On a similar note:
Is there a way to see who the last non-RT_System user was to update a
ticket?
We have a nightly cronjob that ups the priority, causing LastUpdatedByObj
to be set to the RT::User object for RT_System.
Travis
Travis Campbell - Unix Systems Administrator = travis@beast.amd.com
5900 E. Ben White Blvd, Austin, TX 78741 = travis.campbell@amd.com
TEL: (512) 602-1888 PAG: (512) 604-0341 = webmaster@beast.amd.com
“Does anything work as expected?” Yes. An axe through the CPU.
If you have an alternate component, package it up with a readme and I’ll
stick it in /contrib on the web site. Because of the extra database queries
this adds to the frontpage display, i suspect it probably won’t make it into
the core release. But it’s a useful addon that I’m sure a lot of folks
will love.
Thanks,
JesseOn Mon, Jan 07, 2002 at 10:02:51PM +0000, Daniel Foster wrote:
$Ticket->IsRequestor($Ticket->LastUpdatedByObj)
This returns true or false depending on if the ticket was last updated by
someone who is a requestor. I don’t know what this will do if there
are multiple requestors listed for a ticket.
This is precisely what I was looking for. Thanks a lot (and thanks for
the multiple requestor confirmation Jesse
By the way - should I submit patches of my changes for future inclusion
anywhere? (Haven’t hacked on RT before)