Re: [rt-users] Link values to - use multiple CF values

2011-08-31 Thread Stuart Browne
> I'd just do a custom display of that Custom Field and build the link
> myself, rather than trying to extend the link to functionality.
> 
> You'll probably find the ShowComponentName callback useful

Kevin,

Thanks for the suggestion.

This is what I ended up with.

/opt/rt3/local/html/Callbacks/MingleCardNumberLink/Elements/ShowCustomFields/ShowComponentName:
---
<%INIT>
#
# Bail if the ticket doesn't have a value in the 'Mingle Card Number' CF.
#
if ($CustomField->Name eq 'Mingle Card Number') {
#
# Construct URL to Mingle
#
my $MingleCard= $Object->FirstCustomFieldValue('Mingle Card 
Number');
if (defined $MingleCard && $MingleCard) {
my $MingleProject = $Object->FirstCustomFieldValue('Mingle 
Project');
if ($MingleProject eq '') {
$MingleProject = 'dnr';
}
printf("(Click) - 
http://URL/projects/%s/cards/";, $MingleProject, $MingleCard, $MingleProject);
}
}

<%ARGS>
$Name => undef
$CustomField => undef
$Object => undef

---

It has one limitation sadly, I can't stop RT from printing the value of the 
custom field (thus the weird '(Click) - ...'), but this is enough for now ;)

Stuart

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26 & 27, 2011
*  San Francisco, CA, USA  October 18 & 19, 2011
*  Washington DC, USA  October 31 & November 1, 2011
*  Melbourne VIC, Australia  November 28 & 29, 2011
*  Barcelona, Spain  November 28 & 29, 2011


[rt-users] Permissions problem. Cannot view queues/tickets or make changes to config as super user

2011-08-31 Thread josh.cole

Permissions problem. Cannot view queues/tickets or make changes to config as
super user. I am logging in as root. Not sure what I did to cause this
problem but if anyone is willing to tell me how to resolve this problem that
would be great. 

-Josh
-- 
View this message in context: 
http://old.nabble.com/Permissions-problem.-Cannot-view-queues-tickets-or-make-changes-to-config-as-super-user-tp32376364p32376364.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26 & 27, 2011
*  San Francisco, CA, USA  October 18 & 19, 2011
*  Washington DC, USA  October 31 & November 1, 2011
*  Melbourne VIC, Australia  November 28 & 29, 2011
*  Barcelona, Spain  November 28 & 29, 2011


Re: [rt-users] Creating RT Reminders via Scrip

2011-08-31 Thread Kevin Falcone
On Wed, Aug 31, 2011 at 11:36:01AM -0500, Andrew Wagner wrote:
>Hello,
> 
>I am running into an issue with a simple scrip that I want to use to 
> generate a reminder for
>the owner of a ticket when its status changes to stalled.  I have the 
> conditions working but
>the action script returns some errors.  Here is the action script that I 
> wrote according to
>the RT::Date and RT::Reminders perldocs.

Have a look at Ticket/Reminders.html for the code that creates Reminders.
Creating an RT::Reminders object manually means that there is no
$self->TicketObj, leading to your problem.

I suspect you want $self->TicketObj->Reminders->Add()

-kevin

>my $tix = $self->TicketObj;
>my $duedate = RT::Date->new($RT::SystemUser);
>my $subject = "Test Subject";
>my $owner = $tix->Owner;
>my $reminder = RT::Reminders->new($RT::SystemUser);
> 
>$duedate->SetToNow();
>$duedate->AddDays( 3 );
> 
>$reminder->Add( Subject => $subject, Owner => $owner, Due => $duedate->ISO 
> );
>return 1;
> 
>The error messages in the debug log are:
> 
>[Wed Aug 31 16:21:27 2011] [debug]: Tried to load a bogus ticket id: ''
>(/opt/rt4/sbin/../lib/RT/Ticket.pm:158)
>[Wed Aug 31 16:21:27 2011] [debug]: '' not a recognised queue object.
>(/opt/rt4/sbin/../lib/RT/Ticket.pm:273)
>[Wed Aug 31 16:21:27 2011] [debug]: RT::Ticket=HASH(0x2b986db2a320) No 
> queue given for ticket
>creation. (/opt/rt4/sbin/../lib/RT/Ticket.pm:278)
> 
>In the Reminders.pm file, these errors are generated from this ticket 
> creation object within
>RT::Reminders->Add:
> 
>my ( $status, $msg ) = $reminder->Create(
>Subject => $args{'Subject'},
>Owner => $args{'Owner'},
>Due => $args{'Due'},
>RefersTo => $self->Ticket,
>Type => 'reminder',
>Queue => $self->TicketObj->Queue,
>);
> 
>Any ideas why this might be throwing null results for $self->Ticket and 
> $self->TicketObj?  Do
>I need to call the RT::Reminders->Ticket and RT::Reminders->TicketObj 
> methods earlier in the
>script?  Should I not be creating the RT::Reminders object as system user?
> 
>I'd appreciate any feedback!
> 
>  --
>  Andrew Wagner
>  Assistant Network Administrator
>  [1]aawag...@wisc.edu
>  265-5710
>  Room 370B
>  Wisconsin Center for Education Research (WCER)
>  [2]www.wcer.wisc.edu
> 
> References
> 
>Visible links
>1. mailto:aawag...@wisc.edu
>2. http://www.wcer.wisc.edu/



> 
> RT Training Sessions (http://bestpractical.com/services/training.html)
> *  Chicago, IL, USA ? September 26 & 27, 2011
> *  San Francisco, CA, USA ? October 18 & 19, 2011
> *  Washington DC, USA ? October 31 & November 1, 2011
> *  Melbourne VIC, Australia ? November 28 & 29, 2011
> *  Barcelona, Spain ? November 28 & 29, 2011



pgpY5YotGBpJG.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA — September 26 & 27, 2011
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Melbourne VIC, Australia — November 28 & 29, 2011
*  Barcelona, Spain — November 28 & 29, 2011

[rt-users] Creating RT Reminders via Scrip

2011-08-31 Thread Andrew Wagner

Hello,

I am running into an issue with a simple scrip that I want to use to 
generate a reminder for the owner of a ticket when its status changes to 
stalled.  I have the conditions working but the action script returns 
some errors.  Here is the action script that I wrote according to the 
RT::Date and RT::Reminders perldocs.


*my $tix = $self->TicketObj;
my $duedate = RT::Date->new($RT::SystemUser);
my $subject = "Test Subject";
my $owner = $tix->Owner;
my $reminder = RT::Reminders->new($RT::SystemUser);

$duedate->SetToNow();
$duedate->AddDays( 3 );

$reminder->Add( Subject => $subject, Owner => $owner, Due => 
$duedate->ISO );

return 1;*

The error messages in the debug log are:*

[Wed Aug 31 16:21:27 2011] [debug]: Tried to load a bogus ticket id: '' 
(/opt/rt4/sbin/../lib/RT/Ticket.pm:158)
[Wed Aug 31 16:21:27 2011] [debug]: '' not a recognised queue object. 
(/opt/rt4/sbin/../lib/RT/Ticket.pm:273)
[Wed Aug 31 16:21:27 2011] [debug]: RT::Ticket=HASH(0x2b986db2a320) No 
queue given for ticket creation. (/opt/rt4/sbin/../lib/RT/Ticket.pm:278)*


In the Reminders.pm file, these errors are generated from this ticket 
creation object within RT::Reminders->Add:


*my ( $status, $msg ) = $reminder->Create(
Subject => $args{'Subject'},
Owner => $args{'Owner'},
Due => $args{'Due'},
RefersTo => $self->Ticket,
Type => 'reminder',
Queue => $self->TicketObj->Queue,
);*

Any ideas why this might be throwing null results for $self->Ticket and 
$self->TicketObj?  Do I need to call the RT::Reminders->Ticket and 
RT::Reminders->TicketObj methods earlier in the script?  Should I not be 
creating the RT::Reminders object as system user?


I'd appreciate any feedback!

--
Andrew Wagner
Assistant Network Administrator
aawag...@wisc.edu
265-5710
Room 370B
Wisconsin Center for Education Research (WCER)
www.wcer.wisc.edu



smime.p7s
Description: S/MIME Cryptographic Signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA — September 26 & 27, 2011
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Melbourne VIC, Australia — November 28 & 29, 2011
*  Barcelona, Spain — November 28 & 29, 2011

Re: [rt-users] User email address bug(s)

2011-08-31 Thread David Chandek-Stark
https://rt.cpan.org/Public/Bug/Display.html?id=70641

Thanks,
David

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone
Sent: Wednesday, August 31, 2011 10:57 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] User email address bug(s)

On Tue, Aug 30, 2011 at 09:11:05PM +, David Chandek-Stark wrote:
> MergeUsers 0.04 has the same problem -- I.e., with it enabled, if you 
> create a user, then manually change its email address to that of 
> another user, the second user's email gets wiped out (set to 0).

Sounds like a bug you should file against RT-Extension-MergeUsers

Directions are here:
https://rt.cpan.org/Public/Bug/Report.html?Queue=RT-Extension-MergeUsers

-kevin

> On 8/30/11 1:24 PM, "Kevin Falcone"  wrote:
> 
> >On Tue, Aug 30, 2011 at 03:24:23PM +, David Chandek-Stark wrote:
> >> Users were not merged.  Disabling extension resolves issue 
> >>(although can  still create new user with leading space in email).  
> >>I will try upgrading  extension.
> >
> >A leading space on email address even appears to work in 4.0 There 
> >isn't anywhere near enough validation of email addresses on manual 
> >user creation.
> >
> >-kevin
> >
> >
> >> On 8/30/11 10:47 AM, "Kevin Falcone"  wrote:
> >> 
> >> >On Tue, Aug 30, 2011 at 02:34:11PM +, David Chandek-Stark wrote:
> >> >> RT 3.8.5
> >> >> RT::Extension::MergeUsers 0.03
> >> >> 
> >> >> I have confirmed a case with this setup as follows:
> >> >> 
> >> >> User A - relevant history
> >> >>   - Tue Dec 07 13:43:34 2010 RT_System - User created
> >> >>   - Fri Aug 12 13:50:22 2011 RT_System - EmailAddress changed 
> >> >> from 'u...@example.com' to ''
> >> >> 
> >> >> User B - relevant history
> >> >>   - Fri Aug 12 13:50:12 2011 privuser - User created
> >> >>   - Fri Aug 12 13:50:22 2011 privuser - EmailAddress changed from '
> >> >> u...@example.com' to 'u...@example.com'
> >> >
> >> >Presumably you've merged User A and User B?  Or is this a bug you 
> >> >see with unmerged users?  What happens when you disable the extension?
> >> >
> >> >> User B's email not only was allowed to be created with a leading
> >>space,
> >> >> but was then allowed to be changed to a value already in use by 
> >> >> User
> >>A
> >> >>--
> >> >> and set A's email to "0" (presumably  
> >> >>http://issues.bestpractical.com/Ticket/Display.html?id=15024).
> >> >> 
> >> >> Are these known bugs with RT 3.8.5 and/or MergeUsers 0.03?  I am 
> >> >>planning  to upgrade RT and MergeUsers, but would like to know 
> >> >>what's going on here.
> >> >
> >> >There were a large number of bugfixes in MergeUser 0.04, released 
> >> >last year.
> >> >
> >> >There have also been a large number of bugfixes since 3.8.5 was 
> >> >released 2 years ago.
> >> >
> >> >I've not seen your specific bug reported.
> >> >
> >> >-kevin
> >> >
> >> >RT Training Sessions 
> >> >(http://bestpractical.com/services/training.html)
> >> >*  Chicago, IL, USA ‹ September 26 & 27, 2011
> >> >*  San Francisco, CA, USA ‹ October 18 & 19, 2011
> >> >*  Washington DC, USA ‹ October 31 & November 1, 2011
> >> >*  Melbourne VIC, Australia ‹ November 28 & 29, 2011
> >> >*  Barcelona, Spain ‹ November 28 & 29, 2011
> >> 
> >> 
> >> RT Training Sessions 
> >> (http://bestpractical.com/services/training.html)
> >> *  Chicago, IL, USA  September 26 & 27, 2011
> >> *  San Francisco, CA, USA  October 18 & 19, 2011
> >> *  Washington DC, USA  October 31 & November 1, 2011
> >> *  Melbourne VIC, Australia  November 28 & 29, 2011
> >> *  Barcelona, Spain  November 28 & 29, 2011
> >
> >RT Training Sessions 
> >(http://bestpractical.com/services/training.html)
> >*  Chicago, IL, USA — September 26 & 27, 2011
> >*  San Francisco, CA, USA — October 18 & 19, 2011
> >*  Washington DC, USA — October 31 & November 1, 2011
> >*  Melbourne VIC, Australia — November 28 & 29, 2011
> >*  Barcelona, Spain — November 28 & 29, 2011
> 
> 
> RT Training Sessions (http://bestpractical.com/services/training.html)
> *  Chicago, IL, USA  September 26 & 27, 2011
> *  San Francisco, CA, USA  October 18 & 19, 2011
> *  Washington DC, USA  October 31 & November 1, 2011
> *  Melbourne VIC, Australia  November 28 & 29, 2011
> *  Barcelona, Spain  November 28 & 29, 2011

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26 & 27, 2011
*  San Francisco, CA, USA  October 18 & 19, 2011
*  Washington DC, USA  October 31 & November 1, 2011
*  Melbourne VIC, Australia  November 28 & 29, 2011
*  Barcelona, Spain  November 28 & 29, 2011

Re: [rt-users] Link values to - use multiple CF values

2011-08-31 Thread Kevin Falcone
On Wed, Aug 31, 2011 at 11:23:28AM +1000, Stuart Browne wrote:
> I have a custom field with a mingle card number. Link-to value works fine for 
> a single mingle project, project name is in the path.  Sadly, the card 
> numbers are not unique between projects.
> As such, I've created a second custom field with the project name in it.  For 
> automated card creation, this works fine.  However, the link-to value is 
> still hard-wired to the single project.
> I thought maybe I could use a search-style CF{name} to get the value of 
> another custom field, but looking at the documentation in 
> ObjectCustomFieldValue_Overlay.pm seems to indicate that it isn't possible.
> Does anybody know of an extension or other 'patch' to allow the inclusion of 
> multiple CF values within the link-to  URL's?  Or do I need to create my own 
> internal jump-to page to do the mapping externally? 

I'd just do a custom display of that Custom Field and build the link
myself, rather than trying to extend the link to functionality.

You'll probably find the ShowComponentName callback useful

-kevin


pgpeVL9o2TO65.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA — September 26 & 27, 2011
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Melbourne VIC, Australia — November 28 & 29, 2011
*  Barcelona, Spain — November 28 & 29, 2011

Re: [rt-users] User email address bug(s)

2011-08-31 Thread Kevin Falcone
On Tue, Aug 30, 2011 at 09:11:05PM +, David Chandek-Stark wrote:
> MergeUsers 0.04 has the same problem -- I.e., with it enabled, if you
> create a user, then manually change its email address to that of another
> user, the second user's email gets wiped out (set to 0).

Sounds like a bug you should file against RT-Extension-MergeUsers

Directions are here:
https://rt.cpan.org/Public/Bug/Report.html?Queue=RT-Extension-MergeUsers

-kevin

> On 8/30/11 1:24 PM, "Kevin Falcone"  wrote:
> 
> >On Tue, Aug 30, 2011 at 03:24:23PM +, David Chandek-Stark wrote:
> >> Users were not merged.  Disabling extension resolves issue (although can
> >> still create new user with leading space in email).  I will try
> >>upgrading
> >> extension.
> >
> >A leading space on email address even appears to work in 4.0
> >There isn't anywhere near enough validation of email addresses on
> >manual user creation.
> >
> >-kevin
> >
> >
> >> On 8/30/11 10:47 AM, "Kevin Falcone"  wrote:
> >> 
> >> >On Tue, Aug 30, 2011 at 02:34:11PM +, David Chandek-Stark wrote:
> >> >> RT 3.8.5
> >> >> RT::Extension::MergeUsers 0.03
> >> >> 
> >> >> I have confirmed a case with this setup as follows:
> >> >> 
> >> >> User A - relevant history
> >> >>   - Tue Dec 07 13:43:34 2010 RT_System - User created
> >> >>   - Fri Aug 12 13:50:22 2011 RT_System - EmailAddress changed from
> >> >> 'u...@example.com' to ''
> >> >> 
> >> >> User B - relevant history
> >> >>   - Fri Aug 12 13:50:12 2011 privuser - User created
> >> >>   - Fri Aug 12 13:50:22 2011 privuser - EmailAddress changed from '
> >> >> u...@example.com' to 'u...@example.com'
> >> >
> >> >Presumably you've merged User A and User B?  Or is this a bug you see
> >> >with unmerged users?  What happens when you disable the extension?
> >> >
> >> >> User B's email not only was allowed to be created with a leading
> >>space,
> >> >> but was then allowed to be changed to a value already in use by User
> >>A
> >> >>--
> >> >> and set A's email to "0" (presumably
> >> >> http://issues.bestpractical.com/Ticket/Display.html?id=15024).
> >> >> 
> >> >> Are these known bugs with RT 3.8.5 and/or MergeUsers 0.03?  I am
> >> >>planning
> >> >> to upgrade RT and MergeUsers, but would like to know what's going on
> >> >>here.
> >> >
> >> >There were a large number of bugfixes in MergeUser 0.04, released last
> >> >year.
> >> >
> >> >There have also been a large number of bugfixes since 3.8.5 was
> >> >released 2 years ago.
> >> >
> >> >I've not seen your specific bug reported.
> >> >
> >> >-kevin
> >> >
> >> >RT Training Sessions (http://bestpractical.com/services/training.html)
> >> >*  Chicago, IL, USA ‹ September 26 & 27, 2011
> >> >*  San Francisco, CA, USA ‹ October 18 & 19, 2011
> >> >*  Washington DC, USA ‹ October 31 & November 1, 2011
> >> >*  Melbourne VIC, Australia ‹ November 28 & 29, 2011
> >> >*  Barcelona, Spain ‹ November 28 & 29, 2011
> >> 
> >> 
> >> RT Training Sessions (http://bestpractical.com/services/training.html)
> >> *  Chicago, IL, USA  September 26 & 27, 2011
> >> *  San Francisco, CA, USA  October 18 & 19, 2011
> >> *  Washington DC, USA  October 31 & November 1, 2011
> >> *  Melbourne VIC, Australia  November 28 & 29, 2011
> >> *  Barcelona, Spain  November 28 & 29, 2011
> >
> >RT Training Sessions (http://bestpractical.com/services/training.html)
> >*  Chicago, IL, USA — September 26 & 27, 2011
> >*  San Francisco, CA, USA — October 18 & 19, 2011
> >*  Washington DC, USA — October 31 & November 1, 2011
> >*  Melbourne VIC, Australia — November 28 & 29, 2011
> >*  Barcelona, Spain — November 28 & 29, 2011
> 
> 
> RT Training Sessions (http://bestpractical.com/services/training.html)
> *  Chicago, IL, USA  September 26 & 27, 2011
> *  San Francisco, CA, USA  October 18 & 19, 2011
> *  Washington DC, USA  October 31 & November 1, 2011
> *  Melbourne VIC, Australia  November 28 & 29, 2011
> *  Barcelona, Spain  November 28 & 29, 2011


pgp2MUcvll5yj.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA — September 26 & 27, 2011
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Melbourne VIC, Australia — November 28 & 29, 2011
*  Barcelona, Spain — November 28 & 29, 2011

Re: [rt-users] RT-Extension-SideBySideView on 4.02

2011-08-31 Thread Torsten Brumm
Will have a Look on it Next Week!

Torsten

Von meinem iPhone gesendet

Am 30.08.2011 um 21:33 schrieb Shawn O'Connor :

> I'm trying to implement the following:
> https://github.com/tbrumm/RT-Extension-SideBySideView
> 
> It says on the website for RT 3.8
> http://www.bestpractical.com/rt/extensions.html?J:V-region-extension-list.id=44
> 
> I thought I would try it with 4.02, but I get the following error from the 
> application web page after adding the plugin, refreshing the cache, and 
> restarting apache.
> 
> could not find component for path '/Ticket/Elements/Tabs' 
> 
> So, does it just not work in RT 4.02 yet, or have I don't something wrong?  I 
> installed as per the README and added the plugin reference in the 
> RT_SiteConfig.pm file.  Not quite sure where to go next. --Thanks again.
> 
> And then, maybe I'm missing the obvious -- is there a different way in 4.0x 
> that I should be doing this?
> 
> 
> RT Training Sessions (http://bestpractical.com/services/training.html)
> *  Chicago, IL, USA  September 26 & 27, 2011
> *  San Francisco, CA, USA  October 18 & 19, 2011
> *  Washington DC, USA  October 31 & November 1, 2011
> *  Melbourne VIC, Australia  November 28 & 29, 2011
> *  Barcelona, Spain  November 28 & 29, 2011

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26 & 27, 2011
*  San Francisco, CA, USA  October 18 & 19, 2011
*  Washington DC, USA  October 31 & November 1, 2011
*  Melbourne VIC, Australia  November 28 & 29, 2011
*  Barcelona, Spain  November 28 & 29, 2011