Re: [rt-users] Getting SetTimeWorkedAutomatically Working in RT 4.2.9

2016-08-02 Thread Jeffrey Pilant
geraldsnm writes:
> Our management is adamant about having time tracked automatically on
> tickets.
>
> I've been banging my head against a wall for 2 months trying to get this to
> work VIA pure SQL until I realized that the data model seems to not support
> it. Specifically although there's a transaction logged every time the ticket
> goes from open to stalled back to opened, there's no idea of a transaction
> session so that if I try to write SQL that joins transaction to transaction,
> and tries to subtract the latest time stamp for "opened" from the last
> "opened" there's no way to determine which two "Opened" transactions
> corelate to the transaction before it, so it ends up double counting
> (imagine a ticket that goes from Opened, to Stalled, to Opened, to Stalled
> and so-on), I end up having subtracting all latest records from the original
> record so it double counts.
>
> So I've tried to use the Scrips to do this, and noticed there's already a
> user-contributed Scrip for "SetTimeWorkedAutomatically":
>
> https://rt-wiki.bestpractical.com/wiki/SetTimeWorkedAutomatically
>
> However I can't get this to work on my version of RT

> Can anyone help out with this?

Can't help with the scrip.

Rolling my own, I would do the following:
1) Determine the deltas.
Join each transaction A of a ticket with each transaction B of the same 
ticket where A.timestamp > B.timestamp, and find the minimum delta time for 
each A, noting A.state as OldState, B.state as NewState, and diff(A.timestamp, 
B.timestamp) as Delta.
2) Determine if the delta counts.
For each ticket, if [OldState,NewState] is countable, add to total
3) Print results.
For each ticket, print total and other needed details.

Writing SQL for the above is likely hard.  However, a procedural method like 
this could be used instead:
1) Select all transactions for all relevant tickets, sorting by [Ticket Number, 
Timestamp]
2) Process each transaction in turn
  If the ticket number changes:
 If already on a ticket, print details.
 Set TotalTime = 0
 Set StartTime = timestamp
 Set CurrentTime = timestamp
 Set CurrentState = State
  If this transaction ends a countable time, add it:
 If [CurrentState,State] should be counted:
Set TotalTime = TotalTime + (timestamp - CurrentTime)
  Update tracking variables:
 Set CurrentTime = timestamp
 Set CurrentState = State
3) Print the last entry
  Print details

/jeff

The information contained in this e-mail is for the exclusive use of the 
intended recipient(s) and may be confidential, proprietary, and/or 
legally privileged.  Inadvertent disclosure of this message does not 
constitute a waiver of any privilege.  If you receive this message in 
error, please do not directly or indirectly use, print, copy, forward,
or disclose any part of this message.  Please also delete this e-mail 
and all copies and notify the sender.  Thank you. 

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Stuck in Login page

2016-08-02 Thread Hugo Escobar
Update:

I'm running the standalone http server as indicated here:

http://kb.mit.edu/confluence/display/istcontrib/How+to+run+a+Request+Tracker+server+instance+in+standalone+mode+for+troubleshooting

and got the following output in debug.log:

[Tue Aug  2 19:57:43 2016] [info]: Successful login for root from 127.0.0.1
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:831)
[Tue Aug  2 19:57:43 2016] [debug]: SQL(0.001227s): SELECT main.* FROM
Attributes main  WHERE (main.ObjectId = 1) AND (main.ObjectType =
'RT::System')  ORDER BY main.id ASC ;
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:1308)
[Tue Aug  2 19:57:43 2016] [debug]: SQL(0.000672s): SELECT  * FROM Users
WHERE Name = ?;  [ bound values: 'root' ]
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:1308)
[Tue Aug  2 19:57:43 2016] [debug]: SQL(0.000583s): SELECT  * FROM
Principals WHERE id = ?;  [ bound values: '12' ]
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:1308)
[Tue Aug  2 19:57:43 2016] [debug]: SQL(0.001327s): SELECT main.* FROM
Attributes main  WHERE (main.ObjectId = 1) AND (main.ObjectType =
'RT::System')  ORDER BY main.id ASC ;
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:1308)
[Tue Aug  2 19:57:44 2016] [debug]: SQL(0.002197s): SELECT main.* FROM
Attributes main  WHERE (main.ObjectId = 1) AND (main.ObjectType =
'RT::System')  ORDER BY main.id ASC ;
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:1308)
[Tue Aug  2 19:57:44 2016] [debug]: SQL(0.001655s): SELECT main.* FROM
Attributes main  WHERE (main.ObjectId = 1) AND (main.ObjectType =
'RT::System')  ORDER BY main.id ASC ;
(/path/to/rt/sbin/../lib/RT/Interface/Web.pm:1308)

it looks like it works ok at least to a point in which it decides to
redirect
the user to the login page. Nothing in log files (apache,rt) seems to
indicate a problem


On Tue, Aug 2, 2016 at 1:57 PM, Hugo Escobar  wrote:

> Hi,
>
> We are in the process of upgrading rt to 4.4.1
>
> I'm having a problem with my local instance. I cannot go beyond the login
> page. Note the following lines in the apache logs. The first two lines (in
> blue) appear when it works ok
>
>  - - [02/Aug/2016:13:39:45 -0400] "POST /NoAuth/Login.html
> HTTP/1.1" 302 -
>  - - [02/Aug/2016:13:39:45 -0400] "GET / HTTP/1.1" 200 6979
>  - - [02/Aug/2016:13:39:45 -0400] "GET
> /NoAuth/Login.html?next=f7662257268ca40cca1dc91310117c47 HTTP/1.1" 200 6993
>  - - [02/Aug/2016:13:39:45 -0400] "GET
> /NoAuth/Login.html?next=982ee72957d160bd2a07b3a938d2fa79 HTTP/1.1" 200 6993
>   (...)
>
>
> It looks like it's not an authentication problem (from rt logs):
> [3778] [Tue Aug  2 17:39:45 2016] [info]: Successful login for root from
>  (/path/to/rt-4.4.1/sbin/../lib/RT/Interface/Web.pm:831)
>
> I've done all those basic debugging procedures like erasing browser
> cookies, restarting apache erasing the mason cache, etc and nothing seems
> to work. Google searches haven't given me anything useful either
>
> Any help will be highly appreciated
>
> --
> Regards,
>
> Hugo Escobar
>
> 
>
> 4770 Biscayne Blvd, Ste 700
> Miami, FL 33137
>
> main: 305.677.0022
> support: 305.921.4620
> email: hesco...@afslc.com
>
> Follow us on Facebook and Linked-In
> 
>
>
> NOTICE: This email and any attachment to this email may contain
> confidential information. If you are not the intended recipient, you must
> not review, retransmit, convert to hard copy, photocopy, use or disseminate
> this email or any attachments to it. If you have received this email in
> error, please notify us immediately by return email and delete this
> message. Please note that if this email contains a forwarded message or is
> a reply to a prior message, some or all of the contents of this message or
> any attachments may not have been produced by our firm. *As our firm may
> be deemed a debt collector, if your payment is in default, we may be
> attempting to collect a debt on behalf of the association, and any
> information obtained may be used for that purpose.*
>



-- 
Regards,

Hugo Escobar



4770 Biscayne Blvd, Ste 700
Miami, FL 33137

main: 305.677.0022
support: 305.921.4620
email: hesco...@afslc.com

Follow us on Facebook and Linked-In



NOTICE: This email and any attachment to this email may contain
confidential information. If you are not the intended recipient, you must
not review, retransmit, convert to hard copy, photocopy, use or disseminate
this email or any attachments to it. If you have received this email in
error, please notify us immediately by return email and delete this
message. Please note that if this email contains a forwarded message or is
a reply to a prior message, some or all of the contents of this message or
any attachments may 

[rt-users] Simple way to use description of Custom Field in web form?

2016-08-02 Thread Flynn, Timothy
In RT 4.4 for the Self Service area is there a way to use the description of a 
field instead of the field name in the web form?  I'm creating a form but want 
a more verbose description of the field instead of the internal field name.   
I'd like to use the standard form if possible with global Custom Fiends without 
editing in text for the field heading.

Thank you,
Tim





Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Stuck in Login page

2016-08-02 Thread Hugo Escobar
Hi,

We are in the process of upgrading rt to 4.4.1

I'm having a problem with my local instance. I cannot go beyond the login
page. Note the following lines in the apache logs. The first two lines (in
blue) appear when it works ok

 - - [02/Aug/2016:13:39:45 -0400] "POST /NoAuth/Login.html
HTTP/1.1" 302 -
 - - [02/Aug/2016:13:39:45 -0400] "GET / HTTP/1.1" 200 6979
 - - [02/Aug/2016:13:39:45 -0400] "GET
/NoAuth/Login.html?next=f7662257268ca40cca1dc91310117c47 HTTP/1.1" 200 6993
 - - [02/Aug/2016:13:39:45 -0400] "GET
/NoAuth/Login.html?next=982ee72957d160bd2a07b3a938d2fa79 HTTP/1.1" 200 6993
  (...)


It looks like it's not an authentication problem (from rt logs):
[3778] [Tue Aug  2 17:39:45 2016] [info]: Successful login for root from
 (/path/to/rt-4.4.1/sbin/../lib/RT/Interface/Web.pm:831)

I've done all those basic debugging procedures like erasing browser
cookies, restarting apache erasing the mason cache, etc and nothing seems
to work. Google searches haven't given me anything useful either

Any help will be highly appreciated

-- 
Regards,

Hugo Escobar



4770 Biscayne Blvd, Ste 700
Miami, FL 33137

main: 305.677.0022
support: 305.921.4620
email: hesco...@afslc.com

Follow us on Facebook and Linked-In



NOTICE: This email and any attachment to this email may contain
confidential information. If you are not the intended recipient, you must
not review, retransmit, convert to hard copy, photocopy, use or disseminate
this email or any attachments to it. If you have received this email in
error, please notify us immediately by return email and delete this
message. Please note that if this email contains a forwarded message or is
a reply to a prior message, some or all of the contents of this message or
any attachments may not have been produced by our firm. *As our firm may be
deemed a debt collector, if your payment is in default, we may be
attempting to collect a debt on behalf of the association, and any
information obtained may be used for that purpose.*
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Request Tracker - Create Ticket via Email

2016-08-02 Thread Nicholas Adams
Hi Asif, 

Start here: 

https://docs.bestpractical.com/rt/4.2.12/rt-mailgate.html 


Here’s an example of how to set up Fetchmail to poll for mail. 

set daemon 30
set invisible
set no bouncemail
set no syslog
set logfile /var/log/fetchmail
poll imap.gmail.com
proto IMAP service 993 user emailaddr...@gmail.com pass userpassword
folder Inbox ssl
mda "/opt/rt4/bin/rt-mailgate --url https://your.url/ --queue ‘your-queue’  
--action correspond”

This is the way I do it, but you can also land the email directly on the server 
you are using. I’ve found that using external mail server ends with less spam 
blocks, etc. 


> On Aug 2, 2016, at 10:40 AM, asif  wrote:
> 
> hi, Can someone help on this please. 
> 
> 
> 
> --
> View this message in context: 
> http://requesttracker.8502.n7.nabble.com/Request-Tracker-Create-Ticket-via-Email-tp62256p62260.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Los Angeles - September, 2016

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Request Tracker - Create Ticket via Email

2016-08-02 Thread Matt Zagrabelny
What issues are you seeing?

Create ticket via email works out of the gates - assuming you've
correctly configured your system.

-m

On Tue, Aug 2, 2016 at 9:40 AM, asif  wrote:
> hi, Can someone help on this please.
>
>
>
> --
> View this message in context: 
> http://requesttracker.8502.n7.nabble.com/Request-Tracker-Create-Ticket-via-Email-tp62256p62260.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Request Tracker - Create Ticket via Email

2016-08-02 Thread asif
hi, Can someone help on this please. 



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Request-Tracker-Create-Ticket-via-Email-tp62256p62260.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Getting SetTimeWorkedAutomatically Working in RT 4.2.9

2016-08-02 Thread geraldsnm
Hi Folks,

Our management is adamant about having time tracked automatically on
tickets.

I've been banging my head against a wall for 2 months trying to get this to
work VIA pure SQL until I realized that the data model seems to not support
it. Specifically although there's a transaction logged every time the ticket
goes from open to stalled back to opened, there's no idea of a transaction
session so that if I try to write SQL that joins transaction to transaction,
and tries to subtract the latest time stamp for "opened" from the last
"opened" there's no way to determine which two "Opened" transactions
corelate to the transaction before it, so it ends up double counting
(imagine a ticket that goes from Opened, to Stalled, to Opened, to Stalled
and so-on), I end up having subtracting all latest records from the original
record so it double counts.

So I've tried to use the Scrips to do this, and noticed there's already a
user-contributed Scrip for "SetTimeWorkedAutomatically":

https://rt-wiki.bestpractical.com/wiki/SetTimeWorkedAutomatically

However I can't get this to work on my version of RT. First off, when I go
to create a Scrip there's no option for "Custom action cleanup code".

I only get 3x options for creating a Scrip:

"Custom Condition"

"Custom Action Preparation Code"

and

"Custom Action Commit Code"
...

I've tried pasting the perl script that's on the above URL into any of the
3x fields but RT errors and fails to compile the Scrip.

So I then tried to create a custom action with little success.

I can provide my code for the custom action.

Can anyone help out with this?







--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Getting-SetTimeWorkedAutomatically-Working-in-RT-4-2-9-tp62258.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016