Re: [rt-users] Ticket dont display html

2015-08-20 Thread Matt Zagrabelny
On Thu, Aug 20, 2015 at 9:04 AM, androponia andropo...@gmail.com wrote:
 I dont really know, how i check that?

Admin - Global - Scrips

Look at a scrip you are expecting to fire and note the template. Then go to:

Admin - Global - Templates

and see if is an HTML template. Its contents will have:

Content-Type: text/html

in the header portion.

Note that if a scrip fires for a given queue and you have a queue
templates with the same name as a global template, the queue template
will override the global templates for the referenced scrip.

-m


Re: [rt-users] Ticket dont display html

2015-08-20 Thread Matt Zagrabelny
On Thu, Aug 20, 2015 at 9:21 AM, androponia andropo...@gmail.com wrote:
 What i got in my menu is this:

 http://requesttracker.8502.n7.nabble.com/file/n60487/Sin_t%C3%ADtulo.png

That is not helpful.

Your scrips will be located some place like:

https://yoursite.domain/Admin/Global/Scrips.html

-m


Re: [rt-users] Options for user display

2015-08-20 Thread Matt Zagrabelny
On Thu, Aug 20, 2015 at 9:57 AM, Joe Kirby ki...@umbc.edu wrote:
 UMBC is on version 4.2.11 and one of the changes when we upgraded involves
 what gets displayed for privileged and unprivileged users.

Are you talking about when the names are displayed in places like the
History or the People portlet?

If so, yes that is still possible. I've attached the site specific
module that we use for customizing the display. I haven't audited the
code in a while, so chances are the code is suboptimal, FYI.

And then these configs in your site config:

Plugin('RT::Site::UMN::Duluth::UsernameFormat');
Set($UsernameFormat, 'umd00');

Of course changing site specific things to your site.

-m


UsernameFormat.pm
Description: Perl program


Re: [rt-users] setting up auto reply to only work on certain queues.

2015-08-19 Thread Matt Zagrabelny
Hi,

On Wed, Aug 19, 2015 at 6:11 AM, norman norbk...@live.com wrote:
 Hello all.
 I have a setup where if a ticket is created rt will send a message to the
 requester automatically. This is set up to do this for all my queues.
 However, i now have a queue that i need to turn this off on. Looking at
 global scripts i see the on transaction create send auto reply script. I
 can disable this by setting the stage. However, i can't figure out how to
 add a script to the queues that need the auto reply functionality.
 In other words, is it possible to have a script only work on certain queues
 and if so, what am i missing?

You can certainly turn off the scrip (Note: no 't' at the end of the
word) for a given queue. I believe applying scrips per queue showed up
in 4.2. But you can achieve the same functionality with a custom scrip
condition:

Here is a custom scrip condition that we use:

($self-TransactionObj-Type || '') eq 'Create'

($self-TicketObj-Status || '') ne 'resolved'

$self-TicketObj-Owner == RT::Nobody-id

($self-TicketObj-QueueObj-Name || '') !~ /^(?:SIRT)$/

FWIW, RT does not support negative ACLs natively at this point. That
is you can't have a global scrip and then say don't apply to this one
queue. That has to be done with a custom scrip condition.

-m


Re: [rt-users] Problem with extension RepeatTicket

2015-08-19 Thread Matt Zagrabelny
On Wed, Aug 19, 2015 at 5:39 AM, frankfurter d.weidho...@krone.at wrote:
 Hi,

 i want to use the RepeatTicket extension for tickets that have to be done
 daily,weekly and monthly.
 my problem is when i set a ticket to spawn i.e. every week, the ticket
 spawns every day instead. sometimes also the monthly tickets come up every
 day.
 I'm sure that the recurrence date is set correctly.

 my cronjob looks like this:

 0 3 * * *
 /opt/rt4/local/plugins/RT-Extension-RepeatTicket/bin/rt-repeat-ticket

 any ideas ?

I've never ysed RepeatTicket, where are the configs stored? And what
do your configs look like?

-m


Re: [rt-users] Forward ticket with complete history and attachments (refresh)

2015-08-11 Thread Matt Zagrabelny
On Tue, Aug 11, 2015 at 3:53 AM, Piotr Mańturzyk (NooxTechnologies)
piotr.mantur...@nooxtech.pl wrote:
 Hello again,

 I'm close to the solution.

 The most important thing is to include comments:



 file ~/rt4/lib/RT/Action/SendForward.pm line 97:

 VALUE = [qw(Create Correspond Comment)],



 To make RT also to forward Forward transactions (while forwarding you can
 add message too), you need

 VALUE = [qw(Create Correspond Comment Forward Ticket)],



 The problem is that the name of this transactions contain space and is
 treated as two separate transactions types (i.e. Forward and Ticket).



 This trick below does not work:

 VALUE = [qw(Create Correspond Comment Forward\ Ticket)],

If your array has spaces in the items, then the perl function qw isn't
what you want. Just use a list:

VALUE = [
'Create',
'Correspond',
'Comment',
'Forward Ticket',
],

or you could intermix qw into the list, but that is unsightly:

VALUE = [
qw(Create Correspond Comment),
'Forward Ticket',
],

 I renamed the transaction type in the database and it works as expected.

I wouldn't do that. Touching the DB seems to be the wrong approach.

-m


Re: [rt-users] Pre-Populate Description

2015-08-04 Thread Matt Zagrabelny
On Tue, Aug 4, 2015 at 2:57 PM, Joseph D. Wagner j...@josephdwagner.info 
wrote:
 I would like to pre-populate the description of a new ticket. For example,
 if I filed a bug on Red Hat's Bugzilla, a new bug description already
 contains the text:

 Component:
 Version:
 Problem:
 Expected Results:
 Actual Results:
 Additional Info:

 A feature like this would be very helpful to guiding users with what data
 they should enter. Can this be done in RT? If so, how?

You can do this in a variety of ways. Each with their own amount of
work and with their own caveats for use-case. There are probably more
ways that I am not aware of, too.

Use Articles. This is pretty easy, but to my knowledge, the users will
have to select the article from a drop down to get the text into your
content box.

Use QuickCalls:
http://search.cpan.org/dist/RT-Extension-QuickCalls/lib/RT/Extension/QuickCalls.pm
When the user selects an entry from the quick call list, the resulting
ticket content can be populated with the article.

Here is a config snippet:

Plugin('RT::Extension::QuickCalls');

Set(
$QuickCalls,
[
{
Name = 'Elevated Rights',
Queue= 'End User Support',
Status   = 'resolved',
SetOwnerToCurrentUser= 1,
'Articles-Include-Article-Named' = 'Elevated Access Rights',
CommentContent   = q{},
},
]
);

Use a callback to add the text for the given queue. Forgive me the
pasting of code in an email. You'll get the concept.

$ cat 
html/Callbacks/RT-Site-UMN-Duluth-EducationalTechnology/Elements/MessageBox/Default
%perl
if (
(grep /^Create\.html$/, map({$_-name} $m-callers))
# ensure we are at Create.html

# AND
(
! defined $ARGS{Name}
# Name parameter is not defined
||
# OR
$ARGS{Name} ne 'CommentContent'
# Name is not CommentContent (CommentOnCreate)
)

# AND
(
# we are creating in the Educational Technology queue
(
defined $parent_args-{Queue}
# definededness check

# AND
(
# Queue matches a number and is Educational Technology id
(
# or queue does not match a number and is 'Educational
Technology'
$parent_args-{Queue} =~ /^\d+$/

$parent_args-{Queue} ==
$educational_technology_queue_id  # Normal ticket creation
)
||
(
$parent_args-{Queue} !~ /^\d+$/

$parent_args-{Queue} eq 'Educational Technology'
# Quick Create
)
)
)
||
# OR
(
defined $parent_args-{Problem}
# definededness check

# AND
$parent_args-{Problem} =~
/^$educational_technology_queue_id-/# CreateByProblemType
)
)
) {
/%perl
% $content | n %
%perl
}
/%perl
%init
my $parent_args = $m-request_args;

my $educational_technology_queue = new RT::Queue($session{CurrentUser});
$educational_technology_queue-Load('Educational Technology') || return;
my $educational_technology_queue_id = $educational_technology_queue-id;

my $content = __END_OF_CONTENT__;
What is the name of the course, its number and section (e.g., Writing
Studies 1120, section 1)?


What is the specific issue (e.g., students are reporting the quiz in
week 13 is not available)?
__END_OF_CONTENT__

$content = $m-interp-apply_escapes(
$content,
'h',
);

if (RT-Config-Get('MessageBoxRichText',  $session{CurrentUser})) {
$content = pre$content/pre;
}
/%init

-m


Re: [rt-users] resolving stalled tickets after X amount of time

2015-08-04 Thread Matt Zagrabelny
On Tue, Aug 4, 2015 at 1:41 PM, Mike Johnson mike.john...@nosm.ca wrote:
 I tried googling and found an unanswered email to this list from 2006.

 I also found a bunch of links relating to RT's Lifecycle functionality, but
 I wasn't able to figure out if there was a built in way for RT to
 auto-resolve/reject/(some other status) tickets that have been stalled for a
 period of time.

 Ideally, I would like to set tickets to stalled when we are waiting for
 feedback from the requestor, and if that requestor does not respond after a
 given time period(configurable by queue preferrably), the system
 automatically resolves.

 It would be best if when we resolve in this fashion, that the requestor gets
 notified of the automatic resolve... which is why I suggested another
 status, as it would be easy to set a scrip/template for this.

 From what I read in the Lifecycles functionality, it only applies to
 transactions as they are happening. I'm looking to kick off a transaction
 automatically.

 I'm assuming this is a cron + executing a saved query of some sort, then
 actioning on it all.

 Is this built into RT somehow, or do I have to piece it together like I've
 stated above using cron/perl scripting?

It is mostly built-in.

Here is a cron entry we use to adjust ticket status based on a query.

# Puppet Name: access_request_ticket_stale_timeout_set_status
0 12 * * * /opt/rt4/bin/rt-crontool --log=warning --search
RT::Search::FromSQL --search-arg ' Queue = Access Requests AND
Status = activated AND ( ( CF.{Renewal Verified At} IS NULL AND
Created = 410 days ago ) OR ( CF.{Renewal Verified At} IS NOT
NULL AND CF.{Renewal Verified At} = 410 days ago ) ) ' --action
RT::Action::SetStatus --action-arg stale

Let the list know if you don't have your RT cron set up; that is a
prerequisite.

-m


[rt-users] Fwd: Custom field name font size

2015-07-24 Thread Matt Zagrabelny
[bringing this thread back to rt-users]

On Thu, Jul 23, 2015 at 6:08 PM, Phil McLachlan ph...@norfield.com wrote:
 Thanks for your reply Matt :).

 I have no programming experience (disclaimer) but am willing to jump in head 
 first.  I setup 4.2 on a headless Ubuntu Server.  The change would be 
 universal to all the custom fields so I don't think I would need to deal with 
 ID's.  The font size for the custom field titles is extremely small and would 
 just like it to be bigger.

Here are a couple snippets from a Ticket/Create.html rendered page:

 tr class=edit-custom-field cftype-Select
td class=cflabel

  tr class=edit-custom-field cftype-Freeform
td class=cflabel

You can see the table cell with class cflabel.

 Are the files in the /Elements folder what control this stuff, or are you 
 referring to Perl modules in Apache?

It does look like the EditCustomField mason components are in
share/html/Elements. I would stay away from there and stick to CSS
only.

I was referring to a perl module. It's not exactly in Apache. I don't
know if there are (good?) online docs for how to create an RT module.

You can avoid the site specific RT module and just make changes to your theme.

/Admin/Tools/Theme.html

Perhaps a CSS snippet like:

td.cflabel {
font-size: 150%;
}

You may need to make the selector more specific so that the font-size
gets applied, but that is all CSS-foo.

-m


Re: [rt-users] Custom field name font size

2015-07-23 Thread Matt Zagrabelny
On Thu, Jul 23, 2015 at 4:47 PM, Phil McLachlan ph...@norfield.com wrote:
 I've searched and searched and can't figure out where or how to change the
 font size of the custom field names.  Does anyone happen to know how to do
 this?

Use CSS? ;)

This may or may not be a simple task depending on your circumstances.

You could:

Create a site specific module and put a CSS file there. Or you could
go to the theme editor and make some changes.

The id of the CFs are going to cause headaches, so be aware of that
if you need to use IDs.

-m


[rt-users] [Warning: Phish?] Re: p*a*s*s*w*o*r*d quality enforcement?

2015-07-22 Thread Matt Zagrabelny
Hey!

On Wed, Jul 22, 2015 at 8:23 AM, Václav Ovsík vaclav.ov...@i.cz wrote:

 Uhm. Seems to me better to include this into RT::User::ValidatePassword
 I tried this right now and seems to be OK (RT version 4.2.11).
 I did a copy of lib/RT/User.pm into local/lib/RT/User.pm and patch it:

 commit 96c1079c7efcda70cb0467e5a331c29b6a4a5305
 Author: Vaclav Ovsik vaclav.ov...@i.cz
 Date:   Wed Jul 22 14:26:35 2015 +0200

 hack ValidatePassword 2/2: cracklib test

 diff --git a/local/lib/RT/User.pm b/local/lib/RT/User.pm
 index e65478d..627ce75 100644
 --- a/local/lib/RT/User.pm
 +++ b/local/lib/RT/User.pm
 @@ -304,6 +304,11 @@ sub ValidatePassword {
  return ( 0, $self-loc(Password needs to be at least 
 [quant,_1,character,characters] long, 
 RT-Config-Get('MinimumPasswordLength')) );
  }

 +require Crypt::Cracklib;
 +if ( ! Crypt::Cracklib::check($password) ) {
 +return ( 0, $self-loc(Password is too weak (cracklib test)) );
 +}
 +
  return 1;
  }

 This is very simple (requires perl CPAN module Crypt::Cracklib). Can it
 be a feature request? :)

I don't know about that. Just a comment on your implementation:

You don't need to copy the whole file. You can overlay just the
subroutine you'd like:

package RT::Site::YourOrg

# any customizations you'd like

# Switch namespace to redefine ValidatePassword
package RT::User;

use strict;
no warnings qw(redefine);

sub ValidatePassword {
# blah
}

1;

Then make sure your module is loaded in your SiteConfig:

Plugin('RT::Site::YourOrg);

-m


Re: [rt-users] p*a*s*s*w*o*r*d quality enforcement?

2015-07-17 Thread Matt Zagrabelny
On Fri, Jul 17, 2015 at 6:55 AM, Václav Ovsík vaclav.ov...@i.cz wrote:
 Hi,
 is there any way to set password quality enforcement better then its
 minimal length ($MinimumPasswordLength)?

There is a BeforeUpdate callback in
share/html/Admin/Users/Modify.html. Without looking deeper at the code
I don't know if that will also catch new user creation.

You'd have to write a little bit of code and put it in the callback
and fail accordingly if the password didn't meet your requirements.

 I mean something like
  http://sourceforge.net/projects/cracklib
  http://www.openwall.com/passwdqc/
 or so.

 Tried Anyone John The Ripper successfully with RT password hashes?

We use an SSO in front of RT - so no need to have local hashes.

-m


Re: [rt-users] After upgrade to RT 4.2, can only access Self Service

2015-07-17 Thread Matt Zagrabelny
On Fri, Jul 17, 2015 at 1:49 PM, Shane Archer future...@gmail.com wrote:
 Hi,

 I just upgraded my RT 4.0.7 installation to 4.2.8, and while the upgrade
 seems to have gone off correctly, I am no longer able to access anything
 other than the Self Service portal using either of my configured accounts.

 If I punch in a ticket number manually I can view the basics of the ticket,
 but cannot take any action, view any queues, etc.

 I can confirm that the database migrations were run and did not report any
 errors.

 Any idea on where I might begin in order to troubleshoot this?

Can you check with the root account?

If not, check the database to see if your user(s) are still
Privileged. For instance:

rt4=# SELECT * from groups, groupmembers where groupmembers.groupid =
groups.id and groups.name = 'Privileged' and groupmembers.memberid =
98 :G
-[ RECORD 1 ]-+-
id| 4
name  | Privileged
description   | Pseudogroup for internal use
domain| SystemInternal
type  | Privileged
instance  | 0
creator   | 0
created   |
lastupdatedby | 0
lastupdated   |
id| 333405
groupid   | 4
memberid  | 98
creator   | 0
created   |
lastupdatedby | 0
lastupdated   |

-m


Re: [rt-users] Edit fields on mobile

2015-07-17 Thread Matt Zagrabelny
On Fri, Jul 17, 2015 at 2:07 PM, Roman Massey romanmas...@gmail.com wrote:
 Hi everyone,

 is it possible to edit fields on mobile interface? and custom fields?

I don't ever use the mobile interface, but you can check the code:

tree share/html/m
share/html/m
├── dhandler
├── _elements
│   ├── footer
│   ├── full_site_link
│   ├── header
│   ├── login
│   ├── menu
│   ├── ticket_list
│   ├── ticket_menu
│   └── wrapper
├── index.html
├── logout
├── ticket
│   ├── autohandler
│   ├── create
│   ├── history
│   ├── reply
│   ├── select_create_queue
│   └── show
└── tickets
└── search

3 directories, 18 files

Cheers,

-m


Re: [rt-users] After upgrade to RT 4.2, can only access Self Service

2015-07-17 Thread Matt Zagrabelny
Hey Shane,

Well it is good that things are working again. Let's keep rt-users in
the loop. I've re-added them to the recipients list.

I don't have much for other suggestions at this point.

Cheers,

-m

On Fri, Jul 17, 2015 at 2:22 PM, Shane Archer future...@gmail.com wrote:
 On Fri, Jul 17, 2015 at 12:06 PM, Matt Zagrabelny mzagr...@d.umn.edu
 wrote:

 On Fri, Jul 17, 2015 at 1:49 PM, Shane Archer future...@gmail.com wrote:
  Hi,
 
  I just upgraded my RT 4.0.7 installation to 4.2.8, and while the upgrade
  seems to have gone off correctly, I am no longer able to access anything
  other than the Self Service portal using either of my configured
  accounts.
 
  If I punch in a ticket number manually I can view the basics of the
  ticket,
  but cannot take any action, view any queues, etc.
 
  I can confirm that the database migrations were run and did not report
  any
  errors.
 
  Any idea on where I might begin in order to troubleshoot this?

 Can you check with the root account?

 If not, check the database to see if your user(s) are still
 Privileged. For instance:

 rt4=# SELECT * from groups, groupmembers where groupmembers.groupid =
 groups.id and groups.name = 'Privileged' and groupmembers.memberid =
 98 :G
 -[ RECORD 1 ]-+-
 id| 4
 name  | Privileged
 description   | Pseudogroup for internal use
 domain| SystemInternal
 type  | Privileged
 instance  | 0
 creator   | 0
 created   |
 lastupdatedby | 0
 lastupdated   |
 id| 333405
 groupid   | 4
 memberid  | 98
 creator   | 0
 created   |
 lastupdatedby | 0
 lastupdated   |

 -m


 I ran that query and appear to have got a similar result to yours (using ID
 23 which is my normal account):

 mysql SELECT * from Groups, GroupMembers where GroupMembers.groupid =
 Groups.id and Groups.name = 'Privileged' and GroupMembers.memberid = 23 \G
 *** 1. row ***
id: 4
  Name: Privileged
   Description: Pseudogroup for internal use
Domain: SystemInternal
  Type: Privileged
  Instance: 0
   Creator: 0
   Created: NULL
 LastUpdatedBy: 0
   LastUpdated: NULL
id: 10
   GroupId: 4
  MemberId: 23
   Creator: 0
   Created: NULL
 LastUpdatedBy: 0
   LastUpdated: NULL

 Just now, though, I logged in as root and it appears to work -- I am able
 to see my usual dashboard.

 From that, I went to Admin - Users - Select and clicked on my account (the
 same ID 23 from above) and I see that the Let this user be granted rights
 (Privileged) is checked. Without performing any action, I logged out, and
 logged back in as my normal account, and _now_ it works.

 So it appears to have resolved itself; maybe the process of logging in as
 the root account performed some magic? : )


 Thanks,

 Shane


Re: [rt-users] Prevent resolution of Ticket that owner is 'Nobody'

2015-07-16 Thread Matt Zagrabelny
Hi,

I didn't read everything in your email. :)

Have you considered a lifecycle where only the Owner is granted the
right to resolve the ticket?

-m

On Thu, Jul 16, 2015 at 9:34 AM, Murillo Azambuja Gonçalves
muri...@ifi.unicamp.br wrote:
 Hi all,

 I'm using RT 4.2.8 and would like to prevent ticket resolution in which the
 owner is Nobody.
 For that I'm doing two steps:

  Change the custom condition of scrip On Resolve Notify Requestors to not
 notify requesters if Owner is 'Nobody':

 Description: On Resolve Notify Requestors
 Condition: User Defined
 Action: Notify Requestors
 Template: resolved in HTML

 Custom condition:
 if((
 ($self-TransactionObj-Type eq 'Status') or
 ($self-TransactionObj-Type eq 'Set' and
 $self-TransactionObj-Field eq 'Status')
 ) and
 $self-TransactionObj-NewValue eq 'resolved'
 ) {
 if($self-TicketObj-Owner == $RT::Nobody-id) {
 $RT::Logger-debug(Do not notify requestors if Owner is
 Nobody);
 return 0;
 } else {
 return 1;
 }
 }

 return 0;

 Create scrip to change status from resolved to it's old value:

 Description: On Resolve Check Owner
 Condition: On Resolve
 Action: User Defined
 Template: Blank

Custom action commits code:
 # get actor ID
 my $Actor = $self-TransactionObj-Creator;

 # if actor is RT_SystemUser then get out of here
 return 1 if $Actor == $RT::SystemUser-id;

 return 1 unless $self-TicketObj-Owner == $RT::Nobody-id;

 my ($status, $msg) =
 $self-TicketObj-SetStatus($self-TransactionObj-OldValue);
 unless($status) {
 $RT::Logger-error(Error when setting new status: $msg);
 return undef;
 }

 $RT::Logger-debug(Status changed);

 return 1;

 (The scrips above are divided just for separation of concerns purposes)

 It works, but the message that appears confuses the user: Status changed
 from 'open' to 'resolved'. But in fact, the status of the ticket is open
 (setted in scrip above).

 Actually I would like to lock the screen, warning the user that it is
 necessary to assign an owner before resolving the ticket.

 Someone suggests a better solution? How could I lock the screen and display
 a message to the user?

 I tried using the plugin MandatoryOnTransition for this purpose, but does
 not work because it just considers empty fields, and the owner is set to
 Nobody, not empty:
 Set (% MandatoryOnTransition,
  '*' = {
  '* - Resolved' = ['TimeWorked', 'Owner'],
  },
 );

 Please help me.

 Thanks in advance.

 --
 Murillo Azambuja Gonçalves


Re: [rt-users] Prevent resolution of Ticket that owner is 'Nobody'

2015-07-16 Thread Matt Zagrabelny
On Thu, Jul 16, 2015 at 10:05 AM, Murillo Azambuja Gonçalves
muri...@ifi.unicamp.br wrote:
 This can not be done here.
 In some queues those responsible for sending transactions (including tickets
 resolution) are not directly involved in the work of tickets.

 Even I used the scrip AutoSetOwner as a basis to create mine.

 Anyway thanks for your answer.
 Would have another suggestion?

Attach some JS to the Create form and test before posting?

-m


Re: [rt-users] [rt-devel] Need help

2015-07-14 Thread Matt Zagrabelny
On Tue, Jul 14, 2015 at 11:50 AM, Guiguemde Jacques Rodrigue
rodyk...@gmail.com wrote:
 Ok cool
 Thank u for this information,
 But i tried to follow the instructions given but he did not even offer
 me suggestions when I entered. How to suggestion when I keyboarding?

Hi,

I didn't really give any instructions, just advice and some documentation links.

I'm unable to understand what you are asking. :/

-m


Re: [rt-users] Sorting sorted custom field grouping

2015-07-10 Thread Matt Zagrabelny
On Fri, Jul 10, 2015 at 3:22 AM, Ashley Etherington
migetis...@hotmail.com wrote:
 Good morning all.

 I have recently started grouping all of the custom fields and have come
 across a small problem in regards to the order that the custom fields are
 in.  At first I though that the fields would be printed in the order that
 they are placed in the list, but that does not appear to be the case.  Do
 they still take their sort order value from the original custom field
 sorting?

You are correct. Grouping is done vi SiteConfig.pm and sorting is done
via the web admin UI.

-m


Re: [rt-users] [rt-devel] alternative to edit comments

2015-07-07 Thread Matt Zagrabelny
On Tue, Jul 7, 2015 at 8:01 AM, ARBEZ Christophe christophe.ar...@gmail.com
 wrote:

 Hi all,

 I know it is not possible to edit some message in RT. So, I would like how
 you do for a comment if you make a mistake in the content or the time
 worked ?


You can update the ticket time after creating your txn. Perhaps that will
help?


 For example, in a project or intern tickets in your company.
 Is there an alternative to edit transactions like comments?


You could create an Edit Content link and add it to the txn links and
from there create a custom form. You'll need something like:

# {{{
# paper-trail auditor backdoor :)
# Needed to change the txn's time taken via EditBilling.html
package RT::Transaction;

use strict;
no warnings qw(redefine);

sub _Set {
my $self = shift;
$self-SUPER::_Set(@_);
}
# }}}

added to a loaded modules source. We do this for our billing stuff. We have
a module named RT-Site-UMN-Duluth-EFS which the above code snippet lives in
and a form named EditBilling.html which does the front-end work.

Cheers,

-m


Re: [rt-users] using date calcs in reports

2015-07-07 Thread Matt Zagrabelny
On Sun, Jul 5, 2015 at 11:46 PM, Chris Herrmann
chrisherrma...@gmail.com wrote:
 Hi all,

 I can currently export a list of tickets with most of the data I need like
 this:

 rt list queue = 'myqueue' and (  ( Status = 'open' or Status = 'new') OR (
 Resolved  '$startdate' ) ) -f
 id,subject,status,timeworked,requestors,created,started,
 lastupdated,resolved  /tmp/report.tsv

 Now... what I'd like to do is calculate the difference between Created 
 Started... I'm pretty sure that Date::Calc  -  Delta_DHMS will give me what
 I want... but I'm not sure how to use this in the query above. Is that even
 possible?

The following has not been tested with the 'rt' CLI tool.

You could extend RT::Ticket to create a function called
time_until_started, then create a ColumnMap for that new function.

I've written something similar to this (for 3.8) where I wanted to get
the previous owner of a ticket and be able to use that as a column
in searches. Attached is the code. I'm not sure if there are changes
necessary for 4.0 or 4.2.

There are 3 important files:

./html/Callbacks/RT-Extension-PreviousOwner/Elements/RT__Ticket/ColumnMap/Once
./html/Callbacks/RT-Extension-PreviousOwner/Search/Elements/BuildFormatString/Default
./lib/RT/Extension/PreviousOwner.pm

Cheers,

-m


rt-extension-previousowner.tar.gz
Description: GNU Zip compressed data


Re: [rt-users] Comment

2015-06-23 Thread Matt Zagrabelny
On Wed, Jun 17, 2015 at 12:57 PM, Daniel Moore daniel.mo...@osbornewood.com
 wrote:

  Hello,



 Is there anyway to take the comment directly out of lifecycle for the
 Tickets?


Yep.

https://bestpractical.com/docs/rt/latest/customizing/lifecycles.html

You can copy the default lifecycle from RT_Config.pm and then edit to your
desire and store in SiteConfig.

-m


Re: [rt-users] Full text search don't work

2014-12-16 Thread Matt Zagrabelny
On Tue, Dec 16, 2014 at 8:34 AM, Arkady Glazov uglobs...@gmail.com wrote:
 Hi,
 Please help me understand where is my full text search?

 i have Debian Linux machine with Pg, Apache 2 and installed RT 4.2.9 .

Ditto.

 I run rt-setup-fulltext-index successfully, also run rt-fulltext-indexer
 --all and change my RT_SiteConfig.pm:

 Set( %FullTextSearch,
 Enable = 1,
 Indexed= 1,
 Column = 'ContentIndex',
 Table  = 'Attachments',
 );
 Restart Apache and nothing. RT don't search any words in content of tickets.

How are you executing a search?

Just out of curiosity what do the following yield:

SELECT count(*) from attachments where contentindex != '';

SELECT count(*) from attachments where contentindex = '';

Cheers,

-m


Re: [rt-users] How do the 'One-time Cc' and 'One-time Bcc' lists get populated

2014-12-16 Thread Matt Zagrabelny
On Mon, Dec 15, 2014 at 4:08 PM, k...@rice.edu k...@rice.edu wrote:
 Hi RT Users,

 I am trying to clear an address that keeps appearing in the
 One-time Cc/Bcc list on the Reply form for a ticket. The user
 is no longer here, but the address keeps showing up in the
 Reply form for new tickets. How is that list constructed?

Hi Ken,

What version of RT are you using?

-m


Re: [rt-users] How to get TicketObj from a Ticket ID

2009-11-17 Thread Matt Zagrabelny
On Tue, 2009-11-17 at 15:33 +0100, Brumm, Torsten / Kuehne + Nagel / Ham
MI-ID wrote:
 Hi,
 i'm now searching since some hours how to get the TicketObj from a given 
 Ticket ID.
 
 Normally from within a scrip i go this way: $self-TicketObj and i can work 
 with all the Information (like $self-TicketObj-Status etc)
 
 Now i have only i Ticket ID stored in a variable and i'm searching a way to 
 get back my TicketObj.

my $TicketObj = LoadTicket($id);

-- 
Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot

___
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] Notify on Create

2009-03-03 Thread Matt Zagrabelny
On Tue, 2009-03-03 at 08:46 -0500, Ray Wadkins wrote:
 My users are creating tickets and assigning them to owners.
 Unfortuately, I can’t figure out the right scrip to have RT notify the
 assigned owner that a ticket has been created for them.  Are there any
 suggestions/examples.

Condition: On Create
Action:Notify Owner
Template:  Global template: Transaction
Stage: TransactionCreate

-- 
Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] rt-crontool as a user failing

2009-02-09 Thread Matt Zagrabelny
On Sat, 2009-02-07 at 13:57 -0500, Asif Iqbal wrote:
 Hi I am failing to run rt-crontool

Did you map an rt user to a unix user under:

Configuration - Users - Select - (some rt user)

Set 'Unix login' to 'iqbala'.

Cheers,

 
 (iqbala)@rt:~$ /opt/rt3/bin/rt-crontool
 No RT user found. Please consult your RT administrator.
 
 I can login as `iqbala' to the rt gui and I have administrator privilege.
 I can create a new queue, delete existing queue, create a new user,
 delete any ticket on any queue.
 
 But rt-crontool thinks I am not a valid RT user.

-- 
Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] Hardware Config

2009-02-09 Thread Matt Zagrabelny
On Mon, 2009-02-09 at 21:55 +, Tim Cutts wrote:
 I've been following this discussion (rather belatedly) with some  
 interest.  One thing I haven't heard anyone discuss yet:
 
 Has anyone tried running RT in a virtual machine?

Our current production system is a VM. It currently is configured with
4GB of RAM and 2 processors (32-bit). We use a SAN on the backend for
storage as well (XioTech, IIRC.)

Our system has been live for about three weeks and it just passed 1K
tickets.

Things seem snappy, though we experienced some slowdown after our
initial cut. This was due to memory leaks in mod-perl (we restart apache
every night now) and some queries that could have used some indexes
(which BP, operating within a support contract, helped us create.)

HTH

-- 
Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] advanced query

2009-01-05 Thread Matt Zagrabelny
Greetings,

Is it possible to perform an SQL join to another table when creating an
(advanced) query?

I am not looking at adding additional search criteria, but rather
display more information.

I would like to get the Real Name of a requestor in the result set of
my query.

Any thoughts?

Thanks,

-- 
Matt Zagrabelny - mzagr...@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] Anyone using SSL-encrypted backend mysql calls?

2008-09-30 Thread Matt Zagrabelny
On Tue, 2008-09-30 at 19:39 +, Simon Jester wrote:
 Matt Simerson matt at corp.spry.com writes:
 
  
  
  Do NOT use mysql SSL in a production environment.
 
 
 
 Well, that's emphatic enough...guess that means it's forgiveness vs
 permission time. :)

Public mailing lists is not the best place to announce premeditated
policy ignoring. ;)

-- 
Matt Zagrabelny - [EMAIL PROTECTED] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] select unprivileged users

2008-04-24 Thread Matt Zagrabelny
Greetings,

I have searched the mailing list archives, the wiki, and google and
haven not come across an answer to this question:

Is it possible, from the web (Configuration - Users - Select User),
to select (not search for) unprivileged users?

I know that you can search for them, but I am wondering if there is a
config option, flag, check box, etc. that will allow unprivileged users
to show up as the privileged ones do?

Thanks,

-- 
Matt Zagrabelny - [EMAIL PROTECTED] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] number of queues

2008-04-23 Thread Matt Zagrabelny
Greetings,

I am in the early throws of setting up and configuring RT for our
university. I have a question about the granularity with which to create
queues.

First off, is there a performance or otherwise soft or hard limit on the
number of queues that are created? Or is the only downside of creating
many queues the fact that you now need to sift through the multitude of
queues to find the one you are interested in?

Secondly, is there namespaces for queues? That is, some way of
organizing queues into logical groups?

Lastly, I am wondering if anyone can confirm the track that I am going
down or otherwise point me in another direction.

I am thinking that we will have somewhere between 4 and 10 top level
queues at our university.

Some off the top of my head are:

  - help desk
  - phone network requests
  - maintenance requests
  - projects

Underneath those headings there could be queues such as the following:

+ help desk
  |
  + systems team
  + desktop team
  + maintenance team
  + phone net team
  +
  .
  .
  .
  + team number 50

+ phone net requests

+ maintenance requests

+ projects
  |
  + systems project 1
  +
  .
  .
  .
  + systems project N
  + classroom project 1
  +
  .
  .
  .
  + classroom project N
  + other project
  + etc.

I am looking at creating too many queues? What have others done that are
trying to use RT as the single ticketing system for many different
facets of a large organization?

Thanks,

-Matt Zagrabelny
___
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] disable User_Vendor

2008-04-15 Thread Matt Zagrabelny
Greetings,

I have installed RT::Authen::ExternalAuth from CPAN; the module and
corresponding RT hook have been installed as follows:

% tree /usr/local/share/request-tracker3.6/lib
/usr/local/share/request-tracker3.6/lib
`-- RT
|-- Authen
|   `-- ExternalAuth.pm
`-- User_Vendor.pm

I am finding that I am doing quite a bit of testing and configuring at
this point and would like to disable the module. I have done some
googling and searched the wiki and have not found anything that looks
promising.

So, what are the ways of disabling User_Vendor and which are preferred
(or best) ?

TIA,

-- 
Matt Zagrabelny - [EMAIL PROTECTED] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] disable User_Vendor

2008-04-15 Thread Matt Zagrabelny
On Tue, 2008-04-15 at 21:38 +0100, Mike Peachey wrote:
 Matt Zagrabelny wrote:

[...]

  So, what are the ways of disabling User_Vendor and which are preferred
  (or best) ?
 
 
 I suppose I ought to put in a global variable to enable/disable all 
 ExternalAuth settings, you're not the first to enquire, but for the 
 moment, there isn't one.
 
 To stop it from being used for the moment you must rename or remove 
 /usr/local/share/request-tracker3.6/lib/RT/User_Vendor.pm (you can just 
 move it to User_Vendor.bak instead of deleting it). And you must also 
 remove the autohandler Auth callback. I'm not sure where this will be in 
 your distribution, but in a manual single-directory install it would be 
 $RTHOME/share/html/Callbacks/ExternalAuth/autohandler/Auth. Callbacks 
 don't quite work the same as overlays so you are better off just 
 deleting this one for now and replacing it later.

That explains the error I get when I log in. :)

RT::User::UpdateFromExternal Unimplemented in HTML::Mason::Commands.
(/usr/share/request-tracker3.6/html/Callbacks/ExternalAuth/autohandler/Auth 
line 73) 

[...]

 I will try to remember to build a global enable/disable variable into 
 v0.06, but feel free to raise a ticket in rt.cpan.org to remind me.

Done.

Thanks Mike!

-- 
Matt Zagrabelny - [EMAIL PROTECTED] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] trying to use RT-Authen-ExternalAuth-0.05 - problems finding config options

2008-04-14 Thread Matt Zagrabelny
Update - problem solved, though I don't know why.

On Fri, 2008-04-11 at 09:32 +0100, Mike Peachey wrote:
 Matt Zagrabelny wrote:
  Greetings,
  
  I am getting the following error when I try to update a password for an
  account in my RT instance.
 
 Is it JUST when you try to update a password? Or when attempting login too?


Login authentication is handled by a Single Sign-on Apache module. So,
to my knowledge it was just happening when trying to update user data.


 It certainly *seems* like you've got everything set up right, unless 
 there's something small somewhere that's gone wrong.. I would suggest 
 doing a:
 
 use Data::Dumper;
 $RT::Logger-debug(Dumper(@$RT::ExternalAuthPriority));
 
 Just to see if you can confirm that User_Vendor.pm is able to pick up 
 the config option.. but it certainly seems like it can't, hence the 
 undefined value.
 
 This is a LNG shot, but the e-mail you sent is wrapped at so few 
 characters, most things are dropping to new lines and I noticed that the 
 wrapping didn't wrap @$RT::ExternalAuthPriority as one word, but wrapped 
 it like this:
 
 @
 $RT::ExternalAuthPriority
 
 You haven't been trawling the file and accidentally added a space in 
 there have you?

No, thanks for checking though.

What had happened:

We had a power outage on Friday and the computer that RT was housed on
rebooted. Upon reboot things worked as expected.

???

-- 
Matt Zagrabelny - [EMAIL PROTECTED] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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] trying to use RT-Authen-ExternalAuth-0.05 - problems finding config options

2008-04-10 Thread Matt Zagrabelny
Greetings,

I am getting the following error when I try to update a password for an
account in my RT instance.

I am running RT in a Debian Sid environment.

% dpkg -l request-tracker3.6
3.6.6-2

Using PostgreSQL (8.2) as a backend and Apache 2.2 as the webserver.

error:  Can't use an undefined value as an ARRAY reference
at /usr/local/share/request-tracker3.6/lib/RT/User_Vendor.pm line 56.
context:  
... 

52: 
$RT::Logger-debug( (caller(0))[3],
53: 
Trying External authentication);
54: 

55: 
# Get the prioritised list of
external authentication services
56: 
my @auth_services = @
$RT::ExternalAuthPriority;
57: 

58: 
# For each of those services..
59: 
foreach my $service (@auth_services)
{
60: 

Which I believe I have included in the following config option:

% grep ExternalAuthPriority /etc/request-tracker3.6/RT_SiteConfig.pm
Set($ExternalAuthPriority, ['UMD_LDAP']);

Does anyone have any hints or have I missed something obvious?

Thanks,

-- 
Matt Zagrabelny - [EMAIL PROTECTED] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems  Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot


signature.asc
Description: This is a digitally signed message part
___
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

<    1   2   3