Report for Tickets Resolved "Last Month"

Hi.

I know that RT can use some natural language description of dates, but I
haven’t found any combination that seems to work to give me a report of
all tickets resolved “last month”.

Ideally, it would be last month, the whole month, not 30 days ago (or
else, we could really only run the report on 1 day of the month and get
the report we need).

Any suggestions?

Thanks,
Sam

We have a script for just this purpose. I’m working on commenting it better to
make more sense to other people that might use it so any changes can be done
with little confusion. I also need to verify that it is ok with the powers that be.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Samuel P. Howard wrote:

I needed something similar for “ before last” so that I
could say "show me all tickets where (“resolved > Sunday before last”
and “resolved < last Sunday”) to get at tickets resolved last week,
regardless of what day I ran the search. (My Mondays are not generally
conducive to quiet reflection on the previous week’s activity. :slight_smile:

I ended up hacking the necessary into Time::ParseDate, which is what

RT uses to parse out “natural language” dates. It was actually a pretty
simple change; the diff was about 15 lines. Dave Sharnoff (the package
author) was kind enough to accept a patch at some point so it’s now part
of the stock Time::ParseDate.

Perhaps you could look at doing something similar: adding semantics

for “this month”, “last month”, and “next month” to return a date entity
corresponding to 00:00:01 on the 1st of the appropriate month?

Cheers,
	OleOn Thu, 2007-06-21 at 18:30 -0600, Samuel P. Howard wrote:

Hi.

I know that RT can use some natural language description of dates, but I
haven’t found any combination that seems to work to give me a report of
all tickets resolved “last month”.

Ideally, it would be last month, the whole month, not 30 days ago (or
else, we could really only run the report on 1 day of the month and get
the report we need).

Any suggestions?

Thanks,
Sam


The rt-users Archives

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

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
/Ole Craig
Security Engineer
Team lead, customer support

ocraig@stillsecure.com
303-381-3824 direct
303-381-3802 support
303-381-3880 fax

www.stillsecure.com

Attached is the long, not very concise, and ugly script I came up with to get
the information you’re asking for. It should probably be changed to meet your
specific needs (and likely will have to be in some places).

Hope it’s helpful.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Samuel P. Howard wrote:

monthly_timesheet.pl (6.68 KB)

Mathew -
Did you take this from an archived copy? Or did you maybe edit
something before posting it?On Sun, 2007-06-24 at 00:54 -0400, Mathew Snyder wrote:

Attached is the long, not very concise, and ugly script I came up with
to get
the information you’re asking for. It should probably be changed to
meet your
specific needs (and likely will have to be in some places).

/Ole Craig
Security Engineer
Team lead, customer support

ocraig@stillsecure.com
303-381-3824 direct
303-381-3802 support
303-381-3880 fax

www.stillsecure.com

rt-monthly.diff (494 Bytes)

Duh. Awake enough to spot the perl error, not caffeinated enough to draw
the obvious conclusion 'til I looked at my own diff reposted from a
mailing list. Of course you did, you edited out your site-specific email
address.

I will go get coffee now, thankyouverymuch.
	OleOn Mon, 2007-06-25 at 10:05 -0600, Ole Craig wrote:

Or did you maybe edit
something before posting it?
/Ole Craig
Security Engineer
Team lead, customer support

ocraig@stillsecure.com
303-381-3824 direct
303-381-3802 support
303-381-3880 fax

www.stillsecure.com

Wait? I posted this already?

Keep up with my goings on at http://theillien.blogspot.com

Ole Craig wrote:

Another rockin’ Saturday night…

:-)On Mon, 2007-06-25 at 12:25 -0400, Mathew wrote:

Wait? I posted this already?

Keep up with my goings on at http://theillien.blogspot.com

Ole Craig wrote:

Mathew -
Did you take this from an archived copy? Or did you maybe edit
something before posting it?

On Sun, 2007-06-24 at 00:54 -0400, Mathew Snyder wrote:

Attached is the long, not very concise, and ugly script I came up with
to get
the information you’re asking for. It should probably be changed to
meet your
specific needs (and likely will have to be in some places).

/Ole Craig
Security Engineer
Team lead, customer support

ocraig@stillsecure.com
303-381-3824 direct
303-381-3802 support
303-381-3880 fax

www.stillsecure.com