Re: [rt-users] Problems with rt 3.8.7/postgresql 8.4.2 encoding

2010-01-11 Thread Eynat Nir Mishor
Have a look at a thread from last month in rt-devel mailing list:
http://www.gossamer-threads.com/lists/rt/devel/90355 

Sounds similar, though different.

 

Eynat

 

From: Eliezer E Chávez [mailto:eliezer.cha...@gmail.com] 
Sent: Monday, 11 January 2010 5:34 AM
To: RT Users
Subject: [rt-users] Problems with rt 3.8.7/postgresql 8.4.2 encoding

 

Guys:

I found myself with the following error (i live in Venezuela, so we expect
certain characters like á é í ó ú ñ in mail):

[Sun Jan 10 23:51:58 2010] [info]:
rt-3.8.7-17334-1263167518-937.8-...@yv-consulting.com #8/129 - Scrip 3 On
Create Autoreply To Requestors
(/opt/rt/bin/../lib/RT/Action/SendEmail.pm:300)
[Sun Jan 10 23:51:59 2010] [info]:
rt-3.8.7-17334-1263167518-937.8-...@yv-consulting.com sent  To:
echa...@yv-consulting.com.ve (/opt/rt/bin/../lib/RT/Action/SendEmail.pm:331)
[Sun Jan 10 23:51:59 2010] [warning]: DBD::Pg::st execute failed: ERROR:
invalid byte sequence for encoding UTF8: 0xc361
[Sun Jan 10 23:51:59 2010] [warning]: RT::Handle=HASH(0xb89f54c) couldn't
execute the query 'INSERT INTO Attachments (Subject, Filename, ContentType,
Headers, Creator, MessageId, Parent, Created, Content, ContentEncoding,
TransactionId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' at
/usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 522
[Sun Jan 10 23:51:59 2010] [crit]: Attachment insert failed: ERROR:  invalid
byte sequence for encoding UTF8: 0xc361
[Sun Jan 10 23:51:59 2010] [crit]: Attachment insert failed: ERROR:  invalid
byte sequence for encoding UTF8: 0xc361
[Sun Jan 10 23:51:59 2010] [info]:
rt-3.8.7-17334-1263167518-968.8-...@yv-consulting.com #8/129 - Scrip 4 On
Create Notify AdminCcs (/opt/rt/bin/../lib/RT/Action/SendEmail.pm:300)
[Sun Jan 10 23:51:59 2010] [info]:
rt-3.8.7-17334-1263167518-968.8-...@yv-consulting.com No recipients found.
Not sending. (/opt/rt/bin/../lib/RT/Interface/Email.pm:342)
[Sun Jan 10 23:51:59 2010] [info]: Ticket 8 created in queue 'Soporte
[App/Web Server]' by echavez (/opt/rt/bin/../lib/RT/Ticket_Overlay.pm:667)
[Sun Jan 10 23:51:59 2010] [crit]: HasRight called with no valid object
(/opt/rt/bin/../lib/RT/Principal_Overlay.pm:322)

Somebody could pls help me?

Best Regards

EC

P.D. Sorry my losey english!

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Help Regarding Rotating Log File RT.Log

2009-10-06 Thread Eynat Nir Mishor
If you're up-to modifying RT's code, you can use Log::Dispatch::FileRotate
instead of Log::Dispatch::File in a new RT_Local.pm file that will override
InitLogging() function of RT.pm.
Log::Dispatch::FileRotate allows rotation by file size or date/time while
retaining a specified amount of previous files. Does not require restarting
Apache upon log rotation.

Eynat

-Original Message-
From: li...@up-south.com [mailto:li...@up-south.com] 
Sent: Tuesday, 06 October 2009 7:48 AM
To: Varun; rt-users-boun...@lists.bestpractical.com;
rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Help Regarding Rotating Log File RT.Log

Use the standard log rotator
Sent via BlackBerry from T-Mobile

-Original Message-
From: Varun varun.v...@elitecore.com
Date: Tue, 6 Oct 2009 11:16:43 
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Help Regarding Rotating Log File RT.Log

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] CreatedMonthly Graphs broken with Custom Field parameter?

2009-03-25 Thread Eynat Nir Mishor
I,'m sorry I'm replying just now - I had a very large mailing list
backlog...

I filed such a bug with BPS a few weeks ago.
It includes a fix for the problem (add hard-coded main. prefix to some
fields in lib/RT/Report/Tickets.pm)

http://rt3.fsck.com//Ticket/Display.html?id=13258 CreatedDaily (et al)
charts not working when query by CF or by requestor 
(login with guest/guest)

Eynat

-Original Message-
From: Addam Schroll [mailto:ad...@purdue.edu] 
Sent: Monday, 16 March 2009 11:04 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] CreatedMonthly Graphs broken with Custom Field
parameter?

I have a RT 3.8.2 instance setup and I like to use the CreatedMonthly
bar graph to see ticket histories.  The graph, however, appears to break
if you try to use it with a search that includes a custom field parameter.

For example, if I search for all tickets in our firewall queue with the
Request Type custom Field set to any valid value, I get a blank graph
with no totals at the bottom.  I also see the following warnings in the
RT logs.

[Mon Mar 16 20:56:28 2009] [warning]: DBD::mysql::st execute failed:
Column 'Created' in field list is ambiguous at
/usr/local/share/perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 505.
(/usr/local/share/perl/5.8.8/DBIx/SearchBuilder/Handle.pm:505)

[Mon Mar 16 20:56:28 2009] [warning]: RT::Handle=HASH(0x985ec6c)
couldn't execute the query 'SELECT DISTINCT COUNT(main.id) AS id,
SUBSTR(Created,1,7) AS createdmonthly FROM Tickets main JOIN
ObjectCustomFieldValues ObjectCustomFieldValues_1  ON (
ObjectCustomFieldValues_1.CustomField = '7' ) AND (
ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' ) AND (
ObjectCustomFieldValues_1.Disabled = '0' ) AND (
ObjectCustomFieldValues_1.ObjectId = main.id )  WHERE (main.Status !=
'deleted') AND (main.Queue = '4' AND  (  (  (
ObjectCustomFieldValues_1.Content LIKE '%Host Add Request%' OR  (  (
ObjectCustomFieldValues_1.Content = '' OR
ObjectCustomFieldValues_1.Content IS NULL )  AND
ObjectCustomFieldValues_1.LargeContent LIKE '%Host Add Request%' )  )  )
 ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = main.id)  GROUP
BY SUBSTR(Created,1,7) ' at
/usr/local/share/perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 518

Has anyone else run into this issue?  Anyone found a workaround or solution?

Thanks,
Addam

--
Addam Schroll
IT Security and Privacy Analyst
IT Networks  Security, Purdue University
ad...@purdue.edu



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Wrong order of custom fields - using Postgres

2008-05-19 Thread Eynat Nir Mishor
Hi,

After migrating from MySQL to Postgres, I've just found that  custom fields
are not sorted by their queue sort order in Ticket/Display.html.

Instead, they are sorted by the CustomField id.

CustomFields_Overlay.pm even has a comment at the bottom This doesn't work
on postgres.

It seems that the SQL query being issued by RT doesn't work in Postgres:

 

 

SELECT main.* FROM 

(  SELECT main.id FROM CustomFields main JOIN ObjectCustomFields
ObjectCustomFields_1  

ON ( ObjectCustomFields_1.CustomField = main.id )  

WHERE (main.Disabled = '0') AND 

(ObjectCustomFields_1.ObjectId = '1' OR
ObjectCustomFields_1.ObjectId = '0') AND 

(main.LookupType = 'RT::Queue-RT::Ticket')


GROUP BY main.id   

ORDER BY min(ObjectCustomFields_1.ObjectId) ASC, 

 min(ObjectCustomFields_1.SortOrder) ASC  

) distinctquery, CustomFields main WHERE (main.id = distinctquery.id);

 

 

(The inner SELECT query produces the correct order, but the outer SELECT
query changes the order).

 

Using RT 3.6.6 with Postgres 8.3.0 on OpenSuSE 10.3.

Does anyone know if this problem is fixed in some new version of
RT/Postgres/DBIx::SearchBuilder?

Has anyone implemented a workaround in RT to re-sort the output manually?

 

Thanks,

 

Eynat

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Emailing tickets search result

2008-03-04 Thread Eynat Nir Mishor
Hi Jesse,

Was this feature published?

Thanks, Eynat

-Original Message-
From: Jesse Vincent [mailto:[EMAIL PROTECTED] 
Sent: Monday, 11 February 2008 12:27 PM
To: Eynat Nir Mishor
Cc: 'Todd Chapman'; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Emailing tickets search result




On Mon, Feb 11, 2008 at 11:05:00AM +0200, Eynat Nir Mishor wrote:
 That's my fallback.
 But I prefer a self-containing email rather than a link.

We have something kind of cool along these lines that we're working to
get opensourced. I'm hopeful that it will happen this week.


 Eynat
 
 -Original Message-
 From: Todd Chapman [mailto:[EMAIL PROTECTED] 
 Sent: Monday, 11 February 2008 5:12 AM
 To: Eynat Nir Mishor
 Cc: Toby Darling; rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] Emailing tickets search result
 
 Why don't you just email a link to a search so that it runs when clicked?
 
 On 2/7/08, Eynat Nir Mishor [EMAIL PROTECTED] wrote:
  Thanks - it does the job, but it has two drawbacks:
 
  1. It produces very simple textual output.  I would like to send a
richer
  HTML output similar to how search results appear in RT.
 
  2. It is hard to customize.  I would like to use a template mechanism
for
  easy customization that my occur later in time.
 
  Eynat
 
  -Original Message-
  From: Toby Darling [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 06 February 2008 7:24 PM
  To: Eynat Nir Mishor
  Cc: rt-users@lists.bestpractical.com
  Subject: Re: [rt-users] Emailing tickets search result
 
  Hi
 
   Example for usage: every night email the manager a list of all tickets
  that
   were created in the past day and how they divide by current status.
 
  Simple command line:
 
  for s in open new resolved; do
 echo === $s ===; rt list -s created = 'today' AND status = '$s';
  done | mail ...
 
  LEGAL NOTICE
  Unless expressly stated otherwise, information contained in this
  message is confidential. If this message is not intended for you,
  please inform [EMAIL PROTECTED] and delete the message.
  The Cambridge Crystallographic Data Centre is a company Limited
  by Guarantee and a Registered Charity.
  Registered in England No. 2155347 Registered Charity No. 800579
  Registered office 12 Union Road, Cambridge CB2 1EZ.
 
  ___
  http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
  Community help: http://wiki.bestpractical.com
  Commercial support: [EMAIL PROTECTED]
 
 
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
  Buy a copy at http://rtbook.bestpractical.com
 
 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
 

-- 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] HTTP and HTTPS on same RT server?

2008-02-26 Thread Eynat Nir Mishor
I encountered this problem and solved it for RT 3.6.5.
From what I saw, the problem was in RT::Interface::Web::Redirect() function
that is called from html/Ticket/Display.html (and other places).  It
redirected the browser to a URL based on $RT::WebURL configuration only.  So
it always redirected to a http or https scheme URL based on the
configuration.

I changed the function to redirect to URL based on the current scheme
(http/s):

In file local/lib/RT/Interface/Web_Local.pm:

-- Begin File 
package RT::Interface::Web;

sub Redirect {
my $redir_to = shift;
untie $HTML::Mason::Commands::session;
my $uri = URI-new($redir_to);
my $server_uri = URI-new($RT::WebURL);

# If the user is coming in via a non-canonical
# hostname, don't redirect them to the canonical host,
# it will just upset them (and invalidate their credentials)
if ($uri-host  eq $server_uri-host  
$uri-port eq $server_uri-port) {
$uri-host($ENV{'HTTP_HOST'});
$uri-port($ENV{'SERVER_PORT'});
}

# Explicitly set scheme to http/s according to the current request
coming in
my $scheme = ($ENV{'HTTPS'} == on ? https : http);
$uri-scheme($scheme);  

$HTML::Mason::Commands::m-redirect($uri-canonical);
$HTML::Mason::Commands::m-abort;
}

1;
-- End File 



Eynat

-Original Message-
From: Danie Marais [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 26 February 2008 12:38 PM
To: 'Oliver Jeeves'
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] HTTP and HTTPS on same RT server?

 
  Can someone perhaps just confirm that an HTTP and HTTPS 
 combination is
  not possible? 
   
  Thanks

 I don't see why it wouldn't be possible. You can have both an HTTP and
 an HTTPS site serving the same pages, and then redirect people between
 the two based on certain conditions, probably logged in user, or even
 based on a custom field.
 
 Is there any reason why you don't want to use HTTPS for both 
 SelfService
 users and engineers?

I'm not keen to buy an expensive web certificate.  SelfService does not
warrant that level of security, but engineers can be instructed to import
the web certificate.  And HTTP requires slightly less resources.

My current problem is that by correctly setting the WebBaseURL in
RT_SiteConfig.pm to http or https I can get either one of the two working
but not both at the same time.  If http is specified then you cannot submit
replies in https and vice versa.



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Emailing tickets search result

2008-02-11 Thread Eynat Nir Mishor
That's my fallback.
But I prefer a self-containing email rather than a link.

Eynat

-Original Message-
From: Todd Chapman [mailto:[EMAIL PROTECTED] 
Sent: Monday, 11 February 2008 5:12 AM
To: Eynat Nir Mishor
Cc: Toby Darling; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Emailing tickets search result

Why don't you just email a link to a search so that it runs when clicked?

On 2/7/08, Eynat Nir Mishor [EMAIL PROTECTED] wrote:
 Thanks - it does the job, but it has two drawbacks:

 1. It produces very simple textual output.  I would like to send a richer
 HTML output similar to how search results appear in RT.

 2. It is hard to customize.  I would like to use a template mechanism for
 easy customization that my occur later in time.

 Eynat

 -Original Message-
 From: Toby Darling [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 06 February 2008 7:24 PM
 To: Eynat Nir Mishor
 Cc: rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] Emailing tickets search result

 Hi

  Example for usage: every night email the manager a list of all tickets
 that
  were created in the past day and how they divide by current status.

 Simple command line:

 for s in open new resolved; do
echo === $s ===; rt list -s created = 'today' AND status = '$s';
 done | mail ...

 LEGAL NOTICE
 Unless expressly stated otherwise, information contained in this
 message is confidential. If this message is not intended for you,
 please inform [EMAIL PROTECTED] and delete the message.
 The Cambridge Crystallographic Data Centre is a company Limited
 by Guarantee and a Registered Charity.
 Registered in England No. 2155347 Registered Charity No. 800579
 Registered office 12 Union Road, Cambridge CB2 1EZ.

 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]


 Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
 Buy a copy at http://rtbook.bestpractical.com


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Emailing tickets search result

2008-02-06 Thread Eynat Nir Mishor
Does anyone know of a ready-made solution for emailing tickets search result
on a scheduled basis?

rt-crontool is a good solution if you want to do something (e.g. email) on
each individual ticket that matches search query.

But I'm looking for one email being sent which contains a list of all the
tickets that match the search query (and/or a chart of this).

Similar to capturing a snapshot of RT at a glance and sending it by email.

Example for usage: every night email the manager a list of all tickets that
were created in the past day and how they divide by current status.

 

Thanks,

Eynat

 

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Emailing tickets search result

2008-02-06 Thread Eynat Nir Mishor
Thanks - it does the job, but it has two drawbacks:

1. It produces very simple textual output.  I would like to send a richer
HTML output similar to how search results appear in RT.

2. It is hard to customize.  I would like to use a template mechanism for
easy customization that my occur later in time.

Eynat

-Original Message-
From: Toby Darling [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 06 February 2008 7:24 PM
To: Eynat Nir Mishor
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Emailing tickets search result

Hi

 Example for usage: every night email the manager a list of all tickets
that
 were created in the past day and how they divide by current status.

Simple command line:

for s in open new resolved; do
   echo === $s ===; rt list -s created = 'today' AND status = '$s'; 
done | mail ...

LEGAL NOTICE
Unless expressly stated otherwise, information contained in this
message is confidential. If this message is not intended for you,
please inform [EMAIL PROTECTED] and delete the message.
The Cambridge Crystallographic Data Centre is a company Limited
by Guarantee and a Registered Charity.
Registered in England No. 2155347 Registered Charity No. 800579
Registered office 12 Union Road, Cambridge CB2 1EZ.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Search Custom Field for Today's Date

2008-02-04 Thread Eynat Nir Mishor
Thanks Greg - you pointed me in the direction of a solution.

 

It seems that RT uses Time::ParseDate module whose documentation can be
found here: http://search.cpan.org/~muir/Time-modules/lib/Time/ParseDate.pm

It has a wide range of input it can parse.

The relative to current time include:

now (today)

Yesterday

now - 7 days

Etc.

 

Exactly what I needed - thanks!

Eynat

 

From: Greg Evans [mailto:[EMAIL PROTECTED] 
Sent: Sunday, 03 February 2008 10:21 PM
To: Eynat Nir Mishor
Cc: Greg Evans
Subject: Re: [rt-users] Search Custom Field for Today's Date

 

I haven't tried this, but would something like:

 

AND 'CF.{Appt. Date} = 'now'

 

work maybe?

 

I know I am using now in a custom search and it seems to be working for what
I am doing with it and that is just showing all tickets generated that day.

 

My search is Created = 'now' OR Updated = 'now'

 

Just checked it and since I am off for the weekend, and currently the only
person creating tickets, it shows 0 results. DOn't know if that would work
for you or not, but it seems to work for me when I am at work.

 

 

 

Regards,

 

Greg Evans

 

On Feb 3, 2008, at 5:24 AM, Eynat Nir Mishor wrote:





Hi Darren, list,

 

6 months later. have you found a solution to this problem?

I too would like to have a saved search that filters by current date (or
current week, or some other date range relative to today).

It seems there's no such code in pure RT.

Has anyone developed it for his own RT?

 

Thanks in advance,

 

Eynat

 

 

From: Darren Ellis [EMAIL PROTECTED]
Sent: Aug 11, 2007, 4:54 AM
To: rt-users@lists.bestpractical.com
Subject: Search Custom Field for Today's Date

 

Hi All, 

I am using RT 3.6.4 on CentOS 5.0. Everything stock seems to be 
working fine. 

I've defined a few custom fields, one of which I am using as an 
appointment date field. I would like to create a saved search called 
Today's Assignments that automatically searches the date field for 
today's date and returns matches. 

Googling led me to articles that implied that you could use TODAY 
or today as a search criterion. As yet I am unable to successfully 
make this search work. 

I have tried the following date formats in the field: 

MMDD (20070811) 
MM/DD/ (8/11/2007) 

My search criterion line is: 
AND 'CF.{Appt. Date} = 'today' 


I have also tried: 
AND 'CF.{Appt. Date} = 'TODAY' 

I looked through my copy of RT Essentials and didn't find the 
information I needed there either. 

Can anyone help? 

Thanks. 

Darren

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

[rt-users] Search Custom Field for Today's Date

2008-02-03 Thread Eynat Nir Mishor
Hi Darren, list,

 

6 months later. have you found a solution to this problem?

I too would like to have a saved search that filters by current date (or
current week, or some other date range relative to today).

It seems there's no such code in pure RT.

Has anyone developed it for his own RT?

 

Thanks in advance,

 

Eynat

 

 

From: Darren Ellis [EMAIL PROTECTED]
Sent: Aug 11, 2007, 4:54 AM
To: rt-users@lists.bestpractical.com
Subject: Search Custom Field for Today's Date

 

Hi All, 

I am using RT 3.6.4 on CentOS 5.0. Everything stock seems to be 
working fine. 

I've defined a few custom fields, one of which I am using as an 
appointment date field. I would like to create a saved search called 
Today's Assignments that automatically searches the date field for 
today's date and returns matches. 

Googling led me to articles that implied that you could use TODAY 
or today as a search criterion. As yet I am unable to successfully 
make this search work. 

I have tried the following date formats in the field: 

MMDD (20070811) 
MM/DD/ (8/11/2007) 

My search criterion line is: 
AND 'CF.{Appt. Date} = 'today' 


I have also tried: 
AND 'CF.{Appt. Date} = 'TODAY' 

I looked through my copy of RT Essentials and didn't find the 
information I needed there either. 

Can anyone help? 

Thanks. 

Darren

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

[rt-users] Footer callback not working in Bulk.html and Resutls.html + patch solution

2008-01-07 Thread Eynat Nir Mishor
I've created a Footer callback
(html/Callbacks/MyName/Elements/Footer/Default) in order to add my own text
to the end of every page.

I found that the Footer callback wasn't called in Bulk.html and Results.html
(both have links to them from the search results page as Update multiple
tickets and Bookmarkable link respectively).

 

It seems that the problem is due to over-use of the argument name $Page in
RT components.

The callback mechanism is coded in html/Elements/Callback.

This component takes a $Page argument as the path of the component that
triggered the callback.  If it doesn't receive the argument (and it never
does in the standard shipped RT), it computes it from the callstack.

As luck has it, html/Search/Bulk.html and Results.html have a $Page
argument as well for a totally different purpose (page number of search
result in case of many entries).  It has a default value of 1.  Therefore,
this argument is passed on to the Footer and to Callback and RT tries to
look for a callback of a component called 1 instead of Elements/Footer.

 

To fix this, I renamed the argument in  html/Elements/Callback to be called
$PageForCallback (no need to change anything else since no code ever
passes it a value, yet).

I actually did the change in a local version of html/Elements/Callback.

It would be great if this fix would enter the RT code base.

 

Thanks,

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch 
today. 
Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com