Re: [rt-users] Callback to redirect page in Create.html

2012-06-12 Thread Renney, Paul
Jim,

I did it the following way in RT 4.0.5:

Copied share/html/Ticket/Create.html into the local/html/Ticket directory, 
changed the Init callback line in Create.html to make:

$m-callback( CallbackName = Init, ARGSRef = \%ARGS, QueueObj = QueueObj );

Copied original Create.html into local directory and renamed original 
Create.html to another name (CreateNew.html).

In the callback you described 
(local/html/Callbacks/MYNAME/Ticket/Create.html/Init) I have:

%init
if ($Queueobj-Name eq 'Custom Queue Name'){
 $m-redirect($RT::WebURL.Ticket/CreateNew.html?Queue=.$QueueObj-id);
}
/%init

%ARGS
  $QueueObj = undef
/%ARGS

The WebURL part is probably not needed, and I'm not sure what the ARGS section 
does, but I don't want to change it now as it works. Apologies if there are any 
typos, I'm copying it across manually from another terminal.

Regards,
Paul


From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] on behalf of Jim Lesinski 
[jim.lesin...@gmail.com]
Sent: 11 June 2012 23:39
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Callback to redirect page in Create.html

Hello,

Can anyone offer any insight about creating a Callback in Create.html to 
redirect to a custom create page an a per queue basis? I believe I have the 
correct callback in:

/opt/rt4/local/html/Callbacks/MYNAME/Ticket/Create.html/Init

and I am able to perform the redirect, but can't seem to get the queue name 
properly to test the queue name. I am thinking it would be something like

%init
%if ($Queueobj-Name eq 'Whatever'){
 $m-redirect('/Tickets/custom.html');
}
/%init


the redirect portion works fine, I just don't know how to get the queue name. 
If anyone wants to offer up an end to end solution including an example custom 
page that would be even better!

Thanks,
Jim


Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.



Re: [rt-users] Authentication against LDAP and Authorization against internal db

2012-06-12 Thread Ruslan Zakirov
On Tue, Jun 12, 2012 at 5:38 AM, Asif Iqbal vad...@gmail.com wrote:
 I am using external authentication against our corporate AD server
 successfully, using the  RT::Authen::ExternalAuth.

 But I like the authorization done against internal db for user account.

 Just because a user has a valid AD credential is not enough for him/her to
 be able to login to our RT. We like
 to manage the login by creating the user account into internal db using the
 Web UI.

 So we still like the user to use their AD credential and no need to remember
 another password, and at the same time
 only be able to login if the same username is available in internal db.

 Is that possible? Any suggestion/tip is appreciated.

Yes, it is possible, but not like you want it to be.

As far as I can see users need AD record anyway, just mark them
somehow in AD and use this marking in ExternalAuth filter.

 --
 Asif Iqbal
 PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?





-- 
Best regards, Ruslan.


[rt-users] R: ModifySelf RT-4.0.5

2012-06-12 Thread Gibilisco Davide
I wrote the following request a few days ago.
Does anyone have any suggestions?

 

Da: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] Per conto di Gibilisco Davide
Inviato: lunedì 28 maggio 2012 17:31
A: rt-users@lists.bestpractical.com
Oggetto: [rt-users] ModifySelf RT-4.0.5

 

Hi there,

I had grant user with ModifySelf in global section.

But, when user is logged in he can't show Preferences tab.

I spent a lot of time looking for it without success.

Thanks all!


**

Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non gli 
sia pervenuto per errore. In tal caso e' pregato di avvisare immediatamente il 
mittente e, tenuto conto delle responsabilita connesse all'indebito utilizzo 
e/o divulgazione del messaggio e/o delle informazioni in esso contenute, voglia 
cancellare l'originale e distruggere le varie copie o stampe.

The receiver of this message is required to check if he/she has received it 
erroneously. If so, the receiver is requested to immediately inform the sender 
and - in consideration of the responsibilities arising from undue use and/or 
disclosure of the message and/or the information contained therein - destroy 
the original message and any copy or printout thereof.




Re: [rt-users] R: ModifySelf RT-4.0.5

2012-06-12 Thread Thomas Sibley
On 06/12/2012 07:56 AM, Gibilisco Davide wrote:
 I wrote the following request a few days ago.
 Does anyone have any suggestions?
 
 *Da:*rt-users-boun...@lists.bestpractical.com
 [mailto:rt-users-boun...@lists.bestpractical.com] *Per conto di
 *Gibilisco Davide
 *Inviato:* lunedì 28 maggio 2012 17:31
 *A:* rt-users@lists.bestpractical.com
 *Oggetto:* [rt-users] ModifySelf RT-4.0.5
 
 Hi there,
 
 I had grant user with ModifySelf in global section.
 
 But, when user is logged in he can’t show Preferences tab.

Does the user use the self service interface or the normal privileged
interface?

In RT 4 click on Settings under the Logged in as ... menu.

 I spent a lot of time looking for it without success.


Re: [rt-users] Search results showing a bunch of HTML

2012-06-12 Thread Jeff Blaine

On 6/11/2012 5:44 PM, Thomas Sibley wrote:

On 06/11/2012 05:11 PM, Jeff Blaine wrote:

I've not seen this reported. Any ideas?

Performing a search is displaying (showing, not rendering) a bunch
of HTML *after the search results* in RT 3.8.12 and RT 3.8.13
(those are the two I know of at least).


We can't diagnose this without more details and an example.


Well, it's basically exactly as described. Can you tell me
what more I can provide?

Select Tickets at left to start a search. Do a search.

The results appear.

There is a pile of visible HTML shown after the results
table, starting right next to the [CHANGE] button.

Would you like a screenshot?


Re: [rt-users] [SLA] Custom (and very imperfect) solution for parking stalled tickets

2012-06-12 Thread Ruslan Zakirov
On Mon, Jun 11, 2012 at 10:45 AM, Robert Wysocki
robert.wyso...@contium.pl wrote:
 Dnia 2012-06-09, sob o godzinie 22:50 +0400, Ruslan Zakirov pisze:


 On Sat, Jun 9, 2012 at 10:17 PM, Scotto Alberto al.sco...@reply.it
 wrote:
         Much better, following KISS rule: we could simply use hidden
         CFs to store temporary values!
         This way it's much cleaner, isn't it?



 Have you seen Attributes class/table in RT. It's designed for such
 things. Store anything developer like tied to any RT object.


 Actually few days ago I posted my solution for parking tickets that uses
 two extra CF's and also asked in the same post is there any way to avoid
 those. Unfortunately I didn't get any answer then, now I have one.

Sorry. Didn't notice that.

I'm not sure why you need additional data storage. I see putting Due
date on hold in the following way:

1) When status is changed from initial/active to some that marked as
on hold, we just unset Due date. We can not keep old value in the
Due field as it will mess sorting of tickets.

2) When status is changed from on hold to any active, we
re-calculate Due date.

Re-calculation is hard to make sane. RT out of the box opens tickets
on replies, so reply and activation from on hold events match. This
case is very simple, we treat it as any other reply.

It becomes questionable when people disable auto open on some
replies. There are several interesting timelines that may happen:

1) reply ... on hold ... no replies ... activation
2) reply ... on hold ... reply(ies) ... activation

In first case due date can be calculated from reply plus time ticket
was on hold. Second case is harder and I'm still not sure how to treat
it.

So my question is how do you want this to work? If you have sane
ideas, I would love to know.

 Regards,

 --
 Robert Wysocki
 administrator systemów linuksowych
 Contium S.A., http://www.contium.pl



-- 
Best regards, Ruslan.


Re: [rt-users] Search results showing a bunch of HTML

2012-06-12 Thread Thomas Sibley
On 06/12/2012 10:21 AM, Jeff Blaine wrote:
 On 6/11/2012 5:44 PM, Thomas Sibley wrote:
 On 06/11/2012 05:11 PM, Jeff Blaine wrote:
 I've not seen this reported. Any ideas?

 Performing a search is displaying (showing, not rendering) a bunch
 of HTML *after the search results* in RT 3.8.12 and RT 3.8.13
 (those are the two I know of at least).

 We can't diagnose this without more details and an example.
 
 Well, it's basically exactly as described. Can you tell me
 what more I can provide?

The reason it isn't reported by anyone else is because it's not easily
reproducible.  This means it's probably a local configuration or format
or something specific to your RT install.  Simply telling us to do a
search and see the HTML that appears isn't helpful.

 There is a pile of visible HTML shown after the results
 table, starting right next to the [CHANGE] button.
 
 Would you like a screenshot?

We have no way of knowing what that pile of HTML is without seeing it.

Yes, a screenshot would be great as would saving the page's entire
source and sending it.


[rt-users] Callbacks not working

2012-06-12 Thread Mark Collins
Hi all,

I'm trying to get a callback working that hides the system updates in a tickets 
history, but nothing is happening.

I've placed the callback in 
/opt/rt/local/html/Callbacks/Westgate/Tickets/Elements (it's call ShowHistory), 
and the callback code just isn't running. The callback itself is as follows:


%init
my $myskip=1;

if ( $Transaction-Type =~ /^(Correspond|Create)$/ ) {
$myskip = 0;
}
$$skip=$myskip;

/%init

%args
$Transaction = undef
$skip = undef
/%args



Any ideas on why this isn't working?

Mark Collins
Westgate IT
Main
0845 017 8852
Fax
0845 017 8854
Web
http://www.westgateit.com




Fax to email
0845 017 8853









Westgate IT Ltd. 12 Riverside Court, Lower Bristol Road, Bath, BA2 3DZ
Company Registered in England and Wales, 3379298. Vat Registration Number: 692 
0383 29

This message (and any associated files) is intended only for the use of the 
individual or entity to which it is addressed and may contain information that 
is confidential, subject to copyright or constitutes a trade secret. If you are 
not the intended recipient you are hereby notified that any dissemination, 
copying or distribution of this message, or files associated with this message, 
is strictly prohibited. If you have received this message in error, please 
notify us immediately by replying to the message and deleting it from your 
computer. Messages sent to and from us may be monitored.

Internet communications cannot be guaranteed to be secure or error-free as 
information could be intercepted, corrupted, lost, destroyed, arrive late or 
incomplete, or contain viruses. Therefore, we do not accept responsibility for 
any errors or omissions that are present in this message, or any attachment, 
that have arisen as a result of e-mail transmission. If verification is 
required, please request a hard-copy version. Any views or opinions presented 
are solely those of the author and do not necessarily represent those of the 
company.

Scanned by MailDefender - managed email security from intY - 
www.maildefender.net


Re: [rt-users] Authentication against LDAP and Authorization against internal db

2012-06-12 Thread Asif Iqbal
On Tue, Jun 12, 2012 at 5:51 AM, Ruslan Zakirov r...@bestpractical.comwrote:

 On Tue, Jun 12, 2012 at 5:38 AM, Asif Iqbal vad...@gmail.com wrote:
  I am using external authentication against our corporate AD server
  successfully, using the  RT::Authen::ExternalAuth.
 
  But I like the authorization done against internal db for user account.
 
  Just because a user has a valid AD credential is not enough for him/her
 to
  be able to login to our RT. We like
  to manage the login by creating the user account into internal db using
 the
  Web UI.
 
  So we still like the user to use their AD credential and no need to
 remember
  another password, and at the same time
  only be able to login if the same username is available in internal db.
 
  Is that possible? Any suggestion/tip is appreciated.

 Yes, it is possible, but not like you want it to be.

 As far as I can see users need AD record anyway, just mark them
 somehow in AD and use this marking in ExternalAuth filter.


I have no access to AD. It belongs to corporate group and will not be able
to manage a group.

There is no way to control the Authorization part locally?



  --
  Asif Iqbal
  PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
  A: Because it messes up the order in which people normally read text.
  Q: Why is top-posting such a bad thing?
 
 



 --
 Best regards, Ruslan.




-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


[rt-users] R: R: ModifySelf RT-4.0.5

2012-06-12 Thread Gibilisco Davide
 I wrote the following request a few days ago.
 Does anyone have any suggestions?
 
 *Da:*rt-users-boun...@lists.bestpractical.com
 [mailto:rt-users-boun...@lists.bestpractical.com] *Per conto di 
 *Gibilisco Davide
 *Inviato:* lunedì 28 maggio 2012 17:31
 *A:* rt-users@lists.bestpractical.com
 *Oggetto:* [rt-users] ModifySelf RT-4.0.5
 
 Hi there,
 
 I had grant user with ModifySelf in global section.
 
 But, when user is logged in he can’t show Preferences tab. 
 I spent a lot of time looking for it without success.

Does the user use the self service interface or the normal privileged 
interface?

In RT 4 click on Settings under the Logged in as ... menu.

The user has normal privilege on interface, he's has also FULL right.
But Prefereces is not visible on Settings under the Logged in as ... menu.
I'm looking for a function that allows the user to share his tickets when he is 
in out of office

**

Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non gli 
sia pervenuto per errore. In tal caso e' pregato di avvisare immediatamente il 
mittente e, tenuto conto delle responsabilita connesse all'indebito utilizzo 
e/o divulgazione del messaggio e/o delle informazioni in esso contenute, voglia 
cancellare l'originale e distruggere le varie copie o stampe.

The receiver of this message is required to check if he/she has received it 
erroneously. If so, the receiver is requested to immediately inform the sender 
and - in consideration of the responsibilities arising from undue use and/or 
disclosure of the message and/or the information contained therein - destroy 
the original message and any copy or printout thereof.




Re: [rt-users] Callbacks not working

2012-06-12 Thread Ruslan Zakirov
On Tue, Jun 12, 2012 at 6:29 PM, Mark Collins m...@westgateit.com wrote:
 Hi all,

 I'm trying to get a callback working that hides the system updates in a 
 tickets history, but nothing is happening.

 I've placed the callback in 
 /opt/rt/local/html/Callbacks/Westgate/Tickets/Elements (it's call 
 ShowHistory), and the callback code just isn't running. The callback itself 
 is as follows:

It should be .../Westgate/Tickets/Elements/ShowHistory directory and
file should be named after name of the callback you want to use. In
this case it's SkipTransaction.

Below see comments about your code.

 
 %init
 my $myskip=1;

 if ( $Transaction-Type =~ /^(Correspond|Create)$/ ) {
        $myskip = 0;
 }
 $$skip=$myskip;

 /%init

 %args
 $Transaction = undef
 $skip = undef
 /%args


Logic of the code is slightly wrong. It will work, but it doesn't cope
with multiple callbacks. You shouldn't set $$skip to 1. Use return if
$$skip; as first line in the %INIT block. This way you can avoid
conflicts with extensions that use this callback.

Also, condition looks too agressive, you skip status changes,
comments, custom field changes and many other things, but it's really
up to you what to do here.

Check that $m-request_path matches 'Display.html'. This way you can
have short history on ticket's primary page and full when History tab
is clicked.

 

 Any ideas on why this isn't working?

 Mark Collins
 Westgate IT
 Main
 0845 017 8852
 Fax
 0845 017 8854
 Web
 http://www.westgateit.com




 Fax to email
 0845 017 8853









 Westgate IT Ltd. 12 Riverside Court, Lower Bristol Road, Bath, BA2 3DZ
 Company Registered in England and Wales, 3379298. Vat Registration Number: 
 692 0383 29

 This message (and any associated files) is intended only for the use of the 
 individual or entity to which it is addressed and may contain information 
 that is confidential, subject to copyright or constitutes a trade secret. If 
 you are not the intended recipient you are hereby notified that any 
 dissemination, copying or distribution of this message, or files associated 
 with this message, is strictly prohibited. If you have received this message 
 in error, please notify us immediately by replying to the message and 
 deleting it from your computer. Messages sent to and from us may be monitored.

 Internet communications cannot be guaranteed to be secure or error-free as 
 information could be intercepted, corrupted, lost, destroyed, arrive late or 
 incomplete, or contain viruses. Therefore, we do not accept responsibility 
 for any errors or omissions that are present in this message, or any 
 attachment, that have arisen as a result of e-mail transmission. If 
 verification is required, please request a hard-copy version. Any views or 
 opinions presented are solely those of the author and do not necessarily 
 represent those of the company.

 Scanned by MailDefender - managed email security from intY - 
 www.maildefender.net



-- 
Best regards, Ruslan.


[rt-users] Custom template/scrip with conditional responses

2012-06-12 Thread Joe Harris
Is there a way in templates to build one with a conditional response
based on transaction type? (4.0.5)

Example:

I have a template for owner change which works well.  On owner change
notify of change adds the new owner in the subject like so:
Subject: Owner change: {$Ticket-OwnerObj-Name}: {$Ticket-Subject}

{$Transaction-CreatedAsString}: Request {$Ticket-id} was acted upon.
 Transaction: {$Transaction-Description}
   Queue: {$Ticket-QueueObj-Name}
 Subject: {$Transaction-Subject || $Ticket-Subject ||
{$Ticket-OwnerObj-Name} || (No subject given)}
   Owner: {$Ticket-OwnerObj-Name}
  Requestors: {$Ticket-RequestorAddresses}
  Status: {$Ticket-Status}
 Ticket URL: {RT-Config-Get('WebURL')}Ticket/Display.html?id={$Ticket-id}
 Mobile URL: {RT-Config-Get('WebURL')}m/ticket/history?id={$Ticket-id}


What I would like is to have one like that for Status change, but I
don't want the users to get multiple emails on the same transaction.
So if I could what an if statement around the subject line to
determine what the change was and use one template for multiple
purposes.

If owner changes - Show new owner in subject
If status change - Show new status in subject
and/or even if both conditions, add both.

Is this even possible?

Thanks in advance for any insight!

Joe


Re: [rt-users] Callbacks not working

2012-06-12 Thread Mark Collins
Ruslan,

Thanks for the quick response - the file is in the correct path (that was a cut 
 paste error) with the correct name:

loki:/opt/rt/local/html/Callbacks/Westgate/Tickets/Elements/ShowHistory # ls
SkipTransaction

When I look at the ticket history, all the content is still there, even if I 
change the %init block to skip everything.

RT version is 4.0.5

Mark Collins
Westgate IT
0845 017 8852


-Original Message-
From: ruslan.zaki...@gmail.com [mailto:ruslan.zaki...@gmail.com] On Behalf Of 
Ruslan Zakirov
Sent: 12 June 2012 15:40
To: Mark Collins
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Callbacks not working

On Tue, Jun 12, 2012 at 6:29 PM, Mark Collins m...@westgateit.com wrote:
 Hi all,

 I'm trying to get a callback working that hides the system updates in a 
 tickets history, but nothing is happening.

 I've placed the callback in 
 /opt/rt/local/html/Callbacks/Westgate/Tickets/Elements (it's call 
 ShowHistory), and the callback code just isn't running. The callback itself 
 is as follows:

It should be .../Westgate/Tickets/Elements/ShowHistory directory and file 
should be named after name of the callback you want to use. In this case it's 
SkipTransaction.

Below see comments about your code.

 
 %init
 my $myskip=1;

 if ( $Transaction-Type =~ /^(Correspond|Create)$/ ) {
        $myskip = 0;
 }
 $$skip=$myskip;

 /%init

 %args
 $Transaction = undef
 $skip = undef
 /%args


Logic of the code is slightly wrong. It will work, but it doesn't cope with 
multiple callbacks. You shouldn't set $$skip to 1. Use return if $$skip; as 
first line in the %INIT block. This way you can avoid conflicts with 
extensions that use this callback.

Also, condition looks too agressive, you skip status changes, comments, custom 
field changes and many other things, but it's really up to you what to do here.

Check that $m-request_path matches 'Display.html'. This way you can have short 
history on ticket's primary page and full when History tab is clicked.

 

 Any ideas on why this isn't working?

 Mark Collins
 Westgate IT
 Main
 0845 017 8852
 Fax
 0845 017 8854
 Web
 http://www.westgateit.com




 Fax to email
 0845 017 8853









 Westgate IT Ltd. 12 Riverside Court, Lower Bristol Road, Bath, BA2 3DZ 
 Company Registered in England and Wales, 3379298. Vat Registration 
 Number: 692 0383 29

 This message (and any associated files) is intended only for the use of the 
 individual or entity to which it is addressed and may contain information 
 that is confidential, subject to copyright or constitutes a trade secret. If 
 you are not the intended recipient you are hereby notified that any 
 dissemination, copying or distribution of this message, or files associated 
 with this message, is strictly prohibited. If you have received this message 
 in error, please notify us immediately by replying to the message and 
 deleting it from your computer. Messages sent to and from us may be monitored.

 Internet communications cannot be guaranteed to be secure or error-free as 
 information could be intercepted, corrupted, lost, destroyed, arrive late or 
 incomplete, or contain viruses. Therefore, we do not accept responsibility 
 for any errors or omissions that are present in this message, or any 
 attachment, that have arisen as a result of e-mail transmission. If 
 verification is required, please request a hard-copy version. Any views or 
 opinions presented are solely those of the author and do not necessarily 
 represent those of the company.

 Scanned by MailDefender - managed email security from intY - 
 www.maildefender.net



--
Best regards, Ruslan.

Scanned by MailDefender - managed email security from intY - 
www.maildefender.net


Re: [rt-users] SeeGroupDashboard - trying to let group A see group B's dashboards

2012-06-12 Thread Ruslan Zakirov
Hi,

Your steps are correct from ACLs point of view and in theory should work.
However, I totally believe that it may fail to work.

I didn't look into this part of the code for a while and I may be wrong
here. Dashboards inherit privacy and ACL concepts from saved searches that
were in the system for a while. From the beginning we showed group's saved
searches only to users of the group even if she has rights on other groups.
We now have code that can select groups on which user has right X, but
still SQL is complicated and we don't change this.

Basic test can confirm me theory. Add some user from A group to B group,
login as this user and check if he can now see searches of both groups. If
he can then I'm right.

It's fixable, but out of our radar at the moment.

On Sun, Jun 10, 2012 at 4:20 AM, Scotto Alberto al.sco...@reply.it wrote:

  I'm trying to let group A see group B's dashboards, where A and B are
 not related as subgroups
 What I did was:
 Went to Admin/Groups/GroupRights.html?id=group_b_id
 Typed 'A' in the field Add group
 Ticked SeeGroupDashboard right.

 But it doesn't work.
 May be some kind of a bug in the ACL system?
 I'm on RT 4.0.2

 Generally speaking, is it correct my interpretation of the ACL user
 interface, GroupRights.html page?
 I mean, if I am in Groups/GroupRights.html?id=X, and I select a group on
 the left, say Everyone, ticking rights means grant Everyone the right to
 do this or that to Group X, doesn't it?
 As well as, if I am in Queues/GroupRights.html?id=Y, and I select a group
 on the left, say Everyone, ticking rights means grant Everyone the right
 to do something on Queue Y

 Thanks


  Alberto Scotto

 [image: Blue]
 Via Cardinal Massaia, 83
 10147 - Torino - ITALY
 phone: +39 011 29100
 al.sco...@reply.it
 www.reply.it


 --

 --
 The information transmitted is intended for the person or entity to which
 it is addressed and may contain confidential and/or privileged material.
 Any review, retransmission, dissemination or other use of, or taking of any
 action in reliance upon, this information by persons or entities other than
 the intended recipient is prohibited. If you received this in error, please
 contact the sender and delete the material from any computer.




-- 
Best regards, Ruslan.
blue.png

Re: [rt-users] Callback to redirect page in Create.html

2012-06-12 Thread Jim Lesinski
I had thought about doing that but it seemed like there would be some way
to access the queue from the ARGSRef. It's good to know that is an option.

How are you handling custom field layout in your CreateNew.html then?
Ideally I would like to modify the layout of some custom fields or maybe
put them into their own section. It looks like the fields are all rendered
in /Ticket/Elements/EditCustomFields.

What is the best practice there?

Thanks,
Jim

On Tue, Jun 12, 2012 at 3:29 AM, Renney, Paul paul.ren...@logica.comwrote:

  Jim,

 I did it the following way in RT 4.0.5:

 Copied share/html/Ticket/Create.html into the local/html/Ticket directory,
 changed the Init callback line in Create.html to make:

 $m-callback( CallbackName = Init, ARGSRef = \%ARGS, QueueObj =
 QueueObj );

 Copied original Create.html into local directory and renamed original
 Create.html to another name (CreateNew.html).

 In the callback you described
 (local/html/Callbacks/MYNAME/Ticket/Create.html/Init) I have:

 %init
 if ($Queueobj-Name eq 'Custom Queue Name'){
  $m-redirect($RT::WebURL.Ticket/CreateNew.html?Queue=.$QueueObj-id);
 }
 /%init

 %ARGS
   $QueueObj = undef
 /%ARGS

 The WebURL part is probably not needed, and I'm not sure what the ARGS
 section does, but I don't want to change it now as it works. Apologies if
 there are any typos, I'm copying it across manually from another terminal.

 Regards,
 Paul

  --
 *From:* rt-users-boun...@lists.bestpractical.com [
 rt-users-boun...@lists.bestpractical.com] on behalf of Jim Lesinski [
 jim.lesin...@gmail.com]
 *Sent:* 11 June 2012 23:39
 *To:* rt-users@lists.bestpractical.com
 *Subject:* [rt-users] Callback to redirect page in Create.html

  Hello,

  Can anyone offer any insight about creating a Callback in Create.html to
 redirect to a custom create page an a per queue basis? I believe I have the
 correct callback in:

  /opt/rt4/local/html/Callbacks/MYNAME/Ticket/Create.html/Init

  and I am able to perform the redirect, but can't seem to get the queue
 name properly to test the queue name. I am thinking it would be something
 like

  %init
 %if ($Queueobj-Name eq 'Whatever'){
  $m-redirect('/Tickets/custom.html');
 }
 /%init


  the redirect portion works fine, I just don't know how to get the queue
 name. If anyone wants to offer up an end to end solution including an
 example custom page that would be even better!

  Thanks,
 Jim

 Think green - keep it on the screen. This e-mail and any attachment is for
 authorised use by the intended recipient(s) only. It may contain
 proprietary material, confidential information and/or be subject to legal
 privilege. It should not be copied, disclosed to, retained or used by, any
 other party. If you are not an intended recipient then please promptly
 delete this e-mail and any attachment and all copies and inform the sender.
 Thank you.



Re: [rt-users] Callback to redirect page in Create.html

2012-06-12 Thread Thomas Sibley
On 06/12/2012 11:27 AM, Jim Lesinski wrote:
 I had thought about doing that but it seemed like there would be some
 way to access the queue from the ARGSRef. It's good to know that is an
 option. 

Of course you can access the queue via the values in $ARGSRef.  Look at
how the Ticket/Create.html page does it right below the Init callback line.



[rt-users] Articles rights

2012-06-12 Thread Daniel Garcia Mejia

Hi

I have one question about Articles that I have not found searching by 
Google.
I want to build a RT system that has different articles (with differents 
category)  but with different visibility permissions according to 
differents user groups. It is possible?


I only see one permission 'ShowArticles', but show ALL articles. I want 
to show by category for example...



Thanks in advance!




Daniel

--
...
__
   / /   Daniel García Mejía
 C E / S / C A   Portals i Repositoris
 /_/ Centre de Serveis Científics i Acadèmics de Catalunya

Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona
T. NULL · F. 93 205 6979 · dgar...@cesca.cat
Facebook (http://on.fb.me/vPv3oN) · Twitter @CE5CA · Linkedin
Subscriu-te al butlletí (www.cesca.cat/butlleti)

...



[rt-users] Can't add more than one attachment

2012-06-12 Thread Hossein Rafighi

Hi,

I am not certain if this is mis/configuration on my part, but it seems 
users can only add one attachment when they are replying to a ticket 
using the web interface! Although Add More Files button is there, but 
when you click on it it submits a ticket rather than allowing you to add 
more attachments.


Is this a bug, or misconfig on my part? I am using RT 4.0.0

Many thanks,
Hossein

--
  _  _   _  _   _  _   _   Hossein Rafighi
 |_   _||  _  \ |_   _|| | | || \_/ ||  __|TRIUMF, 4004 Wesbrook Mall
   | |  | |_|  )  | |  | | | || || |__ Vancouver BC, Canada, V6T 2A3
   | |  |  _  /   | |  | \_/ || \_/ ||  __|Voice: (604) 222-1047
   | |  | | \ \  _| |_ | || | | || |   Fax:   (604) 222-1074
   |_|  |_|  \_\|_| \___/ |_| |_||_|   Website: http://www.triumf.ca

attachment: RT.png

Re: [rt-users] Callbacks not working

2012-06-12 Thread Ruslan Zakirov
Have you cleaned the mason cache?

On Tue, Jun 12, 2012 at 6:45 PM, Mark Collins m...@westgateit.com wrote:
 Ruslan,

 Thanks for the quick response - the file is in the correct path (that was a 
 cut  paste error) with the correct name:

 loki:/opt/rt/local/html/Callbacks/Westgate/Tickets/Elements/ShowHistory # ls
 SkipTransaction

 When I look at the ticket history, all the content is still there, even if I 
 change the %init block to skip everything.

 RT version is 4.0.5

 Mark Collins
 Westgate IT
 0845 017 8852


 -Original Message-
 From: ruslan.zaki...@gmail.com [mailto:ruslan.zaki...@gmail.com] On Behalf Of 
 Ruslan Zakirov
 Sent: 12 June 2012 15:40
 To: Mark Collins
 Cc: rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] Callbacks not working

 On Tue, Jun 12, 2012 at 6:29 PM, Mark Collins m...@westgateit.com wrote:
 Hi all,

 I'm trying to get a callback working that hides the system updates in a 
 tickets history, but nothing is happening.

 I've placed the callback in 
 /opt/rt/local/html/Callbacks/Westgate/Tickets/Elements (it's call 
 ShowHistory), and the callback code just isn't running. The callback itself 
 is as follows:

 It should be .../Westgate/Tickets/Elements/ShowHistory directory and file 
 should be named after name of the callback you want to use. In this case it's 
 SkipTransaction.

 Below see comments about your code.

 
 %init
 my $myskip=1;

 if ( $Transaction-Type =~ /^(Correspond|Create)$/ ) {
        $myskip = 0;
 }
 $$skip=$myskip;

 /%init

 %args
 $Transaction = undef
 $skip = undef
 /%args


 Logic of the code is slightly wrong. It will work, but it doesn't cope with 
 multiple callbacks. You shouldn't set $$skip to 1. Use return if $$skip; as 
 first line in the %INIT block. This way you can avoid conflicts with 
 extensions that use this callback.

 Also, condition looks too agressive, you skip status changes, comments, 
 custom field changes and many other things, but it's really up to you what to 
 do here.

 Check that $m-request_path matches 'Display.html'. This way you can have 
 short history on ticket's primary page and full when History tab is clicked.

 

 Any ideas on why this isn't working?

 Mark Collins
 Westgate IT
 Main
 0845 017 8852
 Fax
 0845 017 8854
 Web
 http://www.westgateit.com




 Fax to email
 0845 017 8853









 Westgate IT Ltd. 12 Riverside Court, Lower Bristol Road, Bath, BA2 3DZ
 Company Registered in England and Wales, 3379298. Vat Registration
 Number: 692 0383 29

 This message (and any associated files) is intended only for the use of the 
 individual or entity to which it is addressed and may contain information 
 that is confidential, subject to copyright or constitutes a trade secret. If 
 you are not the intended recipient you are hereby notified that any 
 dissemination, copying or distribution of this message, or files associated 
 with this message, is strictly prohibited. If you have received this message 
 in error, please notify us immediately by replying to the message and 
 deleting it from your computer. Messages sent to and from us may be 
 monitored.

 Internet communications cannot be guaranteed to be secure or error-free as 
 information could be intercepted, corrupted, lost, destroyed, arrive late or 
 incomplete, or contain viruses. Therefore, we do not accept responsibility 
 for any errors or omissions that are present in this message, or any 
 attachment, that have arisen as a result of e-mail transmission. If 
 verification is required, please request a hard-copy version. Any views or 
 opinions presented are solely those of the author and do not necessarily 
 represent those of the company.

 Scanned by MailDefender - managed email security from intY -
 www.maildefender.net



 --
 Best regards, Ruslan.

 Scanned by MailDefender - managed email security from intY - 
 www.maildefender.net



-- 
Best regards, Ruslan.


Re: [rt-users] Authentication against LDAP and Authorization against internal db

2012-06-12 Thread Ruslan Zakirov
On Tue, Jun 12, 2012 at 6:35 PM, Asif Iqbal vad...@gmail.com wrote:
 On Tue, Jun 12, 2012 at 5:51 AM, Ruslan Zakirov r...@bestpractical.com
 wrote:

 On Tue, Jun 12, 2012 at 5:38 AM, Asif Iqbal vad...@gmail.com wrote:
  I am using external authentication against our corporate AD server
  successfully, using the  RT::Authen::ExternalAuth.
 
  But I like the authorization done against internal db for user account.
 
  Just because a user has a valid AD credential is not enough for him/her
  to
  be able to login to our RT. We like
  to manage the login by creating the user account into internal db using
  the
  Web UI.
 
  So we still like the user to use their AD credential and no need to
  remember
  another password, and at the same time
  only be able to login if the same username is available in internal db.
 
  Is that possible? Any suggestion/tip is appreciated.

 Yes, it is possible, but not like you want it to be.

 As far as I can see users need AD record anyway, just mark them
 somehow in AD and use this marking in ExternalAuth filter.


 I have no access to AD. It belongs to corporate group and will not be able
 to manage a group.

 There is no way to control the Authorization part locally?

Not out of the box. Patch external auth module and add option to avoid
creation of new users.


  --
  Asif Iqbal
  PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
  A: Because it messes up the order in which people normally read text.
  Q: Why is top-posting such a bad thing?
 
 



 --
 Best regards, Ruslan.




 --
 Asif Iqbal
 PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?





-- 
Best regards, Ruslan.


Re: [rt-users] Callback to redirect page in Create.html

2012-06-12 Thread Jim Lesinski
I see the line:
my $Queue = $ARGS{Queue};

but honestly I can't seem to figure out how to get it to work in the Init
file. Could you show a simple example of it's use?


On Tue, Jun 12, 2012 at 11:36 AM, Thomas Sibley t...@bestpractical.comwrote:

 On 06/12/2012 11:27 AM, Jim Lesinski wrote:
  I had thought about doing that but it seemed like there would be some
  way to access the queue from the ARGSRef. It's good to know that is an
  option.

 Of course you can access the queue via the values in $ARGSRef.  Look at
 how the Ticket/Create.html page does it right below the Init callback line.




[rt-users] RT 3.8.0 DB migrate to 4.0.5 - Errors Please help!

2012-06-12 Thread FrankOh

OK i've searched all over the Internet and I can't seem to fix the problem.
Currently in production we have RHEL (kernel 2.6.18-238.9.1.el5) with
RT3.8.0 installed on mySQL 5.0.77. We want to move RT off of this physical
box and put it on VM. At the same time upgrade to the latest RT 4.0.5.

What I have done so far:
- Got a backup of our DB in production using mysqldump
- Created the brand new environment. Tried two different distros. Debian
(Squeeze) was by far the easiest using all the tutorials and aptitude.
Kernel 2.6.32-5-amd64 with RT 4.0.5 and mysql 5.1.61-0+squeeze1. Also
created a Centos 6.2 (kernel 2.6.32-220.el6.x86_64) environment with RT
4.0.5 and mySQL 5.1.61. 
- In both cases, RT 4.0.5 was working without any issues after the initial
install. Then I deleted the sample DB, created a new empty db (rtdb) and
imported the mySQL dump from production: 

mysql --max_allowed_packet=512M -u root -p rtdb  rt.sql

After the import was complete, if i had a session open from before.. i can
actually browse the RT site and see all my old information.. cool. Then I
did the upgrade using the RT scripts. Since I am not migrating from prior
3.8.0 and I am not moving from mySQL 4.0 to 4.1, I do not need to apply the
mySQL scripts in the README. All i did after this import was:

rt-setup-database --prompt-for-dba-password --action upgrade

After a couple prompts (current version 3.8.0, etc) it did its upgrade
process. I didn't get any errors.. however i did get some warnings.
Something about if you're not using something then don't worry about it.

[Sat Jun  9 20:36:36 2012] [warning]: Going to add [OLD] prefix to all
templates in approvals queue. If you have never used approvals, you can
safely delete all the templates with the [OLD] prefix. Leave the new
Approval templates because you may eventually want to start using approvals.
(./etc/upgrade/3.8.2/content:3)
[Sat Jun  9 20:37:01 2012] [warning]: IMPORTANT: We're going to delete all
scrips in Approvals queue and save them in 'rt-approvals-scrips-cxYO' file.
(./etc/upgrade/3.8.2/content:165)

[Sat Jun  9 20:37:30 2012] [warning]: Couldn't set SortOrder: That is
already the current value (./etc/upgrade/3.8.8/content:32)
[Sat Jun  9 20:37:30 2012] [warning]: Couldn't set SortOrder: That is
already the current value (./etc/upgrade/3.8.8/content:32)

The upgrade finished without a hitch. Now i see 26 tables in my DB (3.8.0,
there were 21). Now again, i can browse the RT site with my imported data. 

Now the error

When i restart the box.. or even restart apache (httpd in Centos and apache2
in Debian).. i get weird errors. 

Debian box (Squeeze):
root@rt-migrate:~# service apache2 restart
Restarting web server: apache2RT since version 3.8 has new schema for MySQL
versions after 4.1.0
Follow instructions in the UPGRADING.mysql file.

[Wed May 30 14:44:45 2012] [warning]:   (in cleanup) Error while loading
/usr/share/request-tracker4/libexec/rt-server: ModPerl::Util::exit: (12)
exit was called at /usr/share/request-tracker4/libexec/rt-server line 135 at
/usr/share/perl5/Plack/Util.pm line 156.
(/usr/share/request-tracker4/lib/RT.pm:353)
 ... waiting RT since version 3.8 has new schema for MySQL versions after
4.1.0
Follow instructions in the UPGRADING.mysql file.

[Wed May 30 14:44:48 2012] [warning]:   (in cleanup) Error while loading
/usr/share/request-tracker4/libexec/rt-server: ModPerl::Util::exit: (12)
exit was called at /usr/share/request-tracker4/libexec/rt-server line 135 at
/usr/share/perl5/Plack/Util.pm line 156.
(/usr/share/request-tracker4/lib/RT.pm:353)

Debian /var/log/apache/error.log

[Wed May 30 14:45:02 2012] [warning]: Subroutine handle_startup_error
redefined at /usr/share/request-tracker4/libexec/rt-server line 240.
(/usr/share/request-tracker4/libexec/rt-server:240)
[Wed May 30 14:45:02 2012] [warning]: Subroutine handle_bind_error redefined
at /usr/share/request-tracker4/libexec/rt-server line 252.
(/usr/share/request-tracker4/libexec/rt-server:252)
RT since version 3.8 has new schema for MySQL versions after 4.1.0
Follow instructions in the UPGRADING.mysql file.

[Wed May 30 07:45:15 2012] [error] [client 10.2.66.131] Error while loading
/usr/share/request-tracker4/libexec/rt-server: ModPerl::Util::exit: (12)
exit was called at /usr/share/request-tracker4/libexec/rt-server line 135 at
/usr/share/perl5/Plack/Util.pm line 156.\n

If i browse to the server: http://server IP/rt I get a 500 Internal Server
error. 

CentOS box 6.2:
Restarting the httpd service doesn't display any errors. Httpd looks like it
started correctly.

Centos /var/log/httpd/error.log
[Sat Jun 09 13:46:41 2012] [notice] Apache/2.2.15 (Unix) DAV/2
mod_fcgid/2.3.7 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured --
resuming normal operations
RT since version 3.8 has new schema for MySQL versions after 4.1.0
Follow instructions in the UPGRADING.mysql file.

[Sat Jun 09 13:46:51 2012] [warn] [client x.x.x.x] (104)Connection reset by
peer: mod_fcgid: error 

[rt-users] R: Autocomplete feature for unprivileged users (AllowUserAutocompleteForUnprivileged?)

2012-06-12 Thread Scotto Alberto
I DID IT

Set($SelfServiceRegex, qr!^(?:/+(SelfService|Helpers/Autocomplete)/)!x );

I'm not a perl regex expert at all, but it works! Or so it seems!
I'm afraid it's too easy to be correct, so, please, tell me if it's fine.

Thank you so much!!!



Da: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] per conto di Thomas Sibley 
[t...@bestpractical.com]
Inviato: martedì 29 maggio 2012 14.57
A: rt-users@lists.bestpractical.com
Oggetto: Re: [rt-users] R: Autocomplete feature for unprivileged users  
(AllowUserAutocompleteForUnprivileged?)

On 05/29/2012 08:50 AM, SCOTTO Alberto (Consultant) (FIAT POWERTRAIN
TECHNOLOGIES) wrote:
 Thank you very much for the link!
 It's a feature very useful for end users, so when I have time, I'll try to 
 figure out how to solve the problem (I see a solution already exists, I'll 
 see if it works on RT4).

FWIW, the autocomplete feature only exists in RT 4.  I believe the
correct workaround is to add /Helpers/Autocomplete/Users and
/Helpers/Autocomplete/Owners to the $SelfServiceRegex config option.

We're working on a fix which also refactors and tidies up the
autocomplete endpoints while we're at it.

Thomas




Alberto Scotto

[Blue]
Via Cardinal Massaia, 83
10147 - Torino - ITALY
phone: +39 011 29100
al.sco...@reply.it
www.reply.it




--
The information transmitted is intended for the person or entity to which it is 
addressed and may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in 
reliance upon, this information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, please contact the 
sender and delete the material from any computer.
inline: blue.png

[rt-users] Slightly off-topic

2012-06-12 Thread Paul Tomblin
I have a need to access information in another database simultaneously
to the , so I cloned RT::Handle.pm into my own RTx::FooBar::Handle
that access the other database.  Now I'm testing this on my Linux box
and everything is running fine, but I copied it over to my MacBook Pro
in order to demo it to a client, but Postgres is complaining that it's
running out of database handles.  So I added a DESTROY method to my
RTx::FooBar::Handle that does a $self-dbh-disconnect.  I stuck a
call to $RT::Logger-debug in that DESTROY method just to make sure.
On the Linux box, it's definitely getting called and the debug is
printing out, but I wasn't running out of handles there so I don't
know if that's helping matters.  On the Mac, either it's not getting
called or the logger isn't working, and it's running out of handles
still.  Any suggestions?

-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin


[rt-users] Extension to allow queue change on creating child ticket

2012-06-12 Thread Mike Johnson
Greetings all,

I searched for an answer to this, but couldn't come up with anything
relevant.

Is there an extension out there, or has someone customized their rt to
allow you to pick the queue a child ticket gets created in? So we don't
have to do a multi-step process to have children tickets on a parent that
are in a different queue?

Would there be some sort of scrip I could make to do this if there isn't an
extension or customization?

Any insight on this would be appreciated.

Thanks!
Mike.

-- 
Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: (807) 766-7331
Email: mike.john...@nosm.ca


[rt-users] R: Extension to allow queue change on creating child ticket

2012-06-12 Thread Scotto Alberto
If I understand well, then you didn't search very well: this extension is 
listed in bestpractical's website!
http://bestpractical.com/rt/extensions.html

http://search.cpan.org/dist/RT-Extension-SpawnLinkedTicketInQueue/lib/RT/Extension/SpawnLinkedTicketInQueue.pm

BTW, there is something I don't quite understand about this extension, and I'm 
gonna ask.
The fact is that the child ticket created by the extension does not contain any 
text of the original request, which doesn't seem very nice to me..
Maybe the idea is to avoid duplicating something memory-expensive as the 
content of a request. Nevertheless it takes much more for the AdminCC of the 
new queue to read the request, as he/she has to do more clicks (links, 
parent).
Anyone who noticed this behaviour and improved it?
I haven't gone deep on this yet, as I'm on configuring/customizing SLA 
extension right now

Thanks



Inizio: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] per conto di Mike Johnson 
[mike.john...@nosm.ca]
Inviato: martedì 12 giugno 2012 22.38
Fine: rt-users@lists.bestpractical.com
Oggetto: [rt-users] Extension to allow queue change on creating child ticket

Greetings all,

I searched for an answer to this, but couldn't come up with anything relevant.

Is there an extension out there, or has someone customized their rt to allow 
you to pick the queue a child ticket gets created in? So we don't have to do a 
multi-step process to have children tickets on a parent that are in a different 
queue?

Would there be some sort of scrip I could make to do this if there isn't an 
extension or customization?

Any insight on this would be appreciated.

Thanks!
Mike.

--
Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: (807) 766-7331
Email: mike.john...@nosm.camailto:mike.john...@nosm.ca



--
The information transmitted is intended for the person or entity to which it is 
addressed and may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in 
reliance upon, this information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, please contact the 
sender and delete the material from any computer.


[rt-users] Search Ticket Transaction History in Query Builder?

2012-06-12 Thread Brian Schrock
All,

The issues are:


1)  How do I search transaction history using the query builder?

2)  How do I convert an SQL statement like the one lower down into 
something I can use in a custom report?

People here in my company have asked me if they can get a report on the number 
of tickets whose status was changed from stalled or resolved into open during a 
specific time frame because of an external e-mail from a customer. I think I 
have the SQL statement working, but I cannot figure out how to do the same 
thing with RT's query builder. I have been all over google and the docs and I 
am not finding anything useful to help point me in the right direction. It 
looks like this issue comes up every so often on the mailing list, but no one 
has really been answered well, I hope I fare better. :)

Any suggestions or help would be greatly appreciated.

SELECT Tickets.id, Tickets.Created, Tickets.Subject, Tickets.Status, Queues.Name
FROM Transactions, Tickets, Queues
WHERE
Tickets.Queue=Queues.id
AND Queues.Name=Test Queue 1
AND Tickets.Status='open'
AND Transactions.ObjectId=Tickets.id
AND Transactions.OldValue REGEXP stalled|resolved
AND Transactions.NewValue='open'
AND Transactions.Data = 'Ticket auto-opened on incoming correspondence'
AND Transactions.Created = @START
AND Transactions.Created = @FINISH

Brian Schrock
Linux Administrator
Network Operations
The Garden City Group, Inc.
5151 Blazer Parkway Suite A
Dublin, ohio 43017
Telephone: 614-289-5457
Mobile: 614-745-5491
Email: brian.schr...@gardencitygroup.com


This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


Re: [rt-users] Callback to redirect page in Create.html

2012-06-12 Thread Jim Lesinski
And here is what I ended up figuring out... Maybe that will even help you
Paul so you don't have to have a local Create.html

%init

my $ARGSRef = $ARGS{'ARGSRef'};

my $QueueObj = new RT::Queue($session{'CurrentUser'});
$QueueObj-Load($ARGSRef-{'Queue'});

if($QueueObj-Name eq 'WhateverQueue')
{
 $m-redirect('/Tickets/MyCustomPage.html');
}
/%init
%ARGS
/%ARGS



On Tue, Jun 12, 2012 at 2:07 PM, Jim Lesinski jim.lesin...@gmail.comwrote:

 I see the line:
 my $Queue = $ARGS{Queue};

 but honestly I can't seem to figure out how to get it to work in the Init
 file. Could you show a simple example of it's use?


 On Tue, Jun 12, 2012 at 11:36 AM, Thomas Sibley t...@bestpractical.comwrote:

 On 06/12/2012 11:27 AM, Jim Lesinski wrote:
  I had thought about doing that but it seemed like there would be some
  way to access the queue from the ARGSRef. It's good to know that is an
  option.

 Of course you can access the queue via the values in $ARGSRef.  Look at
 how the Ticket/Create.html page does it right below the Init callback
 line.





Re: [rt-users] Authentication against LDAP and Authorization against internal db

2012-06-12 Thread Thomas Sibley
On 06/12/2012 05:33 PM, Asif Iqbal wrote:
  On Tue, Jun 12, 2012 at 1:57 PM, Ruslan Zakirov wrote:
   On Tue, Jun 12, 2012 at 6:35 PM, Asif Iqbal wrote:
There is no way to control the Authorization part locally?
  
  Not out of the box. Patch external auth module and add option to avoid
  creation of new users.

 Hi  Thomas Sibley,
 
 First of all, thanks a lot for such an excellent module to make the LDAP
 authentication so simple.
 
 Is it possible to disable the Authorization part on
 RT::Authen::ExternalAuth?
 
 So although authentication is successful, but do not want to authorize the
 user to login until there is a local account for her/him. I don't have
 access to 
 AD to create a separate group for RT user group. So I like to keep the
 Authorization
 part upto the admin guys of our RT.

Ruslan's answer is correct.  (I read rt-users.)

In the future, please don't email my CPAN address personally for
support.  rt-users is the correct place to discuss Best Practical
written and maintained RT extensions.

Thomas


Re: [rt-users] Authentication against LDAP and Authorization against internal db

2012-06-12 Thread Asif Iqbal
On Tue, Jun 12, 2012 at 5:51 PM, Thomas Sibley t...@bestpractical.comwrote:

 On 06/12/2012 05:33 PM, Asif Iqbal wrote:
   On Tue, Jun 12, 2012 at 1:57 PM, Ruslan Zakirov wrote:
On Tue, Jun 12, 2012 at 6:35 PM, Asif Iqbal wrote:
 There is no way to control the Authorization part locally?
  
   Not out of the box. Patch external auth module and add option to
 avoid
   creation of new users.
 
  Hi  Thomas Sibley,
 
  First of all, thanks a lot for such an excellent module to make the LDAP
  authentication so simple.
 
  Is it possible to disable the Authorization part on
  RT::Authen::ExternalAuth?
 
  So although authentication is successful, but do not want to authorize
 the
  user to login until there is a local account for her/him. I don't have
  access to
  AD to create a separate group for RT user group. So I like to keep the
  Authorization
  part upto the admin guys of our RT.

 Ruslan's answer is correct.  (I read rt-users.)

 In the future, please don't email my CPAN address personally for
 support.  rt-users is the correct place to discuss Best Practical
 written and maintained RT extensions.


will do. Thanks for your feedback


  Thomas




-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


Re: [rt-users] TicketSQL Date parse weird..

2012-06-12 Thread Stuart Browne
 -Original Message-
 From: ruslan.zaki...@gmail.com [mailto:ruslan.zaki...@gmail.com]
 Sent: Wednesday, 13 June 2012 12:31 AM
 Subject: Re: [rt-users] TicketSQL Date parse weird..
 
 Hello Stuart,
 
 I've made a typo in the patch. It should be ZONE instead of GMT.
 You can change code by hands after patching, it's close to line 208 in
 lib/RT/Date.pm.
 
 Also, make sure ParseDate module is the latest from the CPAN.
 

snip

Ensured I'm running the latest ParseDate - 2011.0517.  Yes, I was running an 
older version.  The output didn't appear different before changing GMT to ZONE 
(for before-10am).

After changing GMT to ZONE, this happened:

#
# BEFORE 10AM
#

#
# Before patch
#
[bekar@psg-apps tmp]$ ./test.pl
current time() output:  1339542313

fixed-date Time::ParseDate: 1339632000
tomorrow 10am Time::ParseDate:  1339632000

fixed-date RT::Date output: 1339668000
tomorrow 10am RT::Date output:  1339632000
timezone according to RT::Date: 36000
timezone according to RT::Date: 36000

#
# After patch
#
[bekar@psg-apps tmp]$ ./test.pl
current time() output:  1339542211

fixed-date Time::ParseDate: 1339632000
tomorrow 10am Time::ParseDate:  1339632000

fixed-date RT::Date output: 1339668000
tomorrow 10am RT::Date output:  0
timezone according to RT::Date: 36000
timezone according to RT::Date: 36000

So it doesn't like ZONE there it seems:

-GMT   = $self-Timezone($args{'Timezone'}),
+ZONE  = $self-Timezone($args{'Timezone'}),

I'll try again after 14:00 (with GMT and the new ParseDate), although why 
RT::Date is returning 0 there is just odd.

Stuart


Re: [rt-users] Search Ticket Transaction History in Query Builder?

2012-06-12 Thread Joe Harris
This is not available in the query builder. I asked the same question a while 
back and basically the query builder works on the tickets taw only and cannot 
do cross queries. I ended up writing a shell script for my needs which 
basically was any update performed by any member of a particular group 
yesterday. The next morning it is sent to the manager (or the group) depending 
on the system and manager. I can share if you're interested. I may have 
already shared an example on the list here if you search back a month or two. 

Sent from my mobile device. 

On Jun 12, 2012, at 5:22 PM, Brian Schrock brian.schr...@gardencitygroup.com 
wrote:

 All,
  
 The issues are:
  
 1)  How do I search transaction history using the query builder?
 2)  How do I convert an SQL statement like the one lower down into 
 something I can use in a custom report?
  
 People here in my company have asked me if they can get a report on the 
 number of tickets whose status was changed from stalled or resolved into open 
 during a specific time frame because of an external e-mail from a customer. I 
 think I have the SQL statement working, but I cannot figure out how to do the 
 same thing with RT’s query builder. I have been all over google and the docs 
 and I am not finding anything useful to help point me in the right direction. 
 It looks like this issue comes up every so often on the mailing list, but no 
 one has really been answered well, I hope I fare better. J
  
 Any suggestions or help would be greatly appreciated.
  
 SELECT Tickets.id, Tickets.Created, Tickets.Subject, Tickets.Status, 
 Queues.Name
 FROM Transactions, Tickets, Queues
 WHERE
 Tickets.Queue=Queues.id
 AND Queues.Name=Test Queue 1
 AND Tickets.Status='open'
 AND Transactions.ObjectId=Tickets.id
 AND Transactions.OldValue REGEXP stalled|resolved
 AND Transactions.NewValue='open'
 AND Transactions.Data = 'Ticket auto-opened on incoming correspondence'
 AND Transactions.Created = @START
 AND Transactions.Created = @FINISH
 
 Brian Schrock
 Linux Administrator
 Network Operations
 The Garden City Group, Inc. 
 5151 Blazer Parkway Suite A 
 Dublin, ohio 43017
 Telephone: 614-289-5457 
 Mobile: 614-745-5491
 Email: brian.schr...@gardencitygroup.com 
 
 This communication (including any attachments) is intended for the use of the 
 intended recipient(s) only and may contain information that is confidential, 
 privileged or legally protected. Any unauthorized use or dissemination of 
 this communication is strictly prohibited. If you have received this 
 communication in error, please immediately notify the sender by return e-mail 
 message and delete all copies of the original communication. Thank you for 
 your cooperation.


Re: [rt-users] Search Ticket Transaction History in Query Builder?

2012-06-12 Thread Thomas Sibley
 SELECT Tickets.id, Tickets.Created, Tickets.Subject, Tickets.Status, 
 Queues.Name
 FROM Transactions, Tickets, Queues
 WHERE
 Tickets.Queue=Queues.id
 AND Queues.Name=Test Queue 1
 AND Tickets.Status='open'
 AND Transactions.ObjectId=Tickets.id
 AND Transactions.OldValue REGEXP stalled|resolved
 AND Transactions.NewValue='open'
 AND Transactions.Data = 'Ticket auto-opened on incoming correspondence'
 AND Transactions.Created = @START
 AND Transactions.Created = @FINISH

Your join between Tickets and Transactions is wrong.  Transactions also
apply to objects other than tickets, so you need to limit by ObjectType
too not just ObjectId.

(The query is also not quite what you want because it will miss tickets
which are currently Status != 'open' but were auto-opened at some point
earlier in the time frame.)

To solve your problem using RT's normal customization routes, I suggest
extending the default auto-open scrip (user-defined action) to set a
DateTime custom field on the ticket when it fires.  This greatly
simplifies your search and lets you run it in RT from the web.

Your report can then be a standard RT saved search used in a chart or a
dashboard.


Re: [rt-users] Custom template/scrip with conditional responses

2012-06-12 Thread Kevin Falcone
On Tue, Jun 12, 2012 at 10:43:18AM -0400, Joe Harris wrote:
 Is there a way in templates to build one with a conditional response
 based on transaction type? (4.0.5)

RT's Templates are just Text::Template, you can read more about the
syntax at http://search.cpan.org/dist/Text-Template/
You can absolutely say Subject: { if (blah blah blah) { } else {} }
There is more about the particular syntax of RT's templates available
in docs/customiziing/templates.pod

-kevin

 Example:
 
 I have a template for owner change which works well.  On owner change
 notify of change adds the new owner in the subject like so:
 Subject: Owner change: {$Ticket-OwnerObj-Name}: {$Ticket-Subject}
 
 {$Transaction-CreatedAsString}: Request {$Ticket-id} was acted upon.
  Transaction: {$Transaction-Description}
Queue: {$Ticket-QueueObj-Name}
  Subject: {$Transaction-Subject || $Ticket-Subject ||
 {$Ticket-OwnerObj-Name} || (No subject given)}
Owner: {$Ticket-OwnerObj-Name}
   Requestors: {$Ticket-RequestorAddresses}
   Status: {$Ticket-Status}
  Ticket URL: {RT-Config-Get('WebURL')}Ticket/Display.html?id={$Ticket-id}
  Mobile URL: {RT-Config-Get('WebURL')}m/ticket/history?id={$Ticket-id}
 
 
 What I would like is to have one like that for Status change, but I
 don't want the users to get multiple emails on the same transaction.
 So if I could what an if statement around the subject line to
 determine what the change was and use one template for multiple
 purposes.
 
 If owner changes - Show new owner in subject
 If status change - Show new status in subject
 and/or even if both conditions, add both.
 
 Is this even possible?
 
 Thanks in advance for any insight!
 
 Joe


pgpgSoO40FGM9.pgp
Description: PGP signature


Re: [rt-users] Articles rights

2012-06-12 Thread Kevin Falcone
On Tue, Jun 12, 2012 at 05:59:56PM +0200, Daniel Garcia Mejia wrote:
 I have one question about Articles that I have not found searching
 by Google.
 I want to build a RT system that has different articles (with
 differents category)  but with different visibility permissions
 according to differents user groups. It is possible?
 
 I only see one permission 'ShowArticles', but show ALL articles. I
 want to show by category for example...

You want to split your Articles up across Classes.
You can read more about Classes in
docs/customizing/articles_introduction.pod
and then grant ShowArticles on each of those.
Also keep in mind that Classes can be assigned to a particular Queue,
in addition to Globally, so you can control where they show up.

-kevin


pgpVSm8g4CqNQ.pgp
Description: PGP signature


Re: [rt-users] Can't add more than one attachment

2012-06-12 Thread Kevin Falcone
On Tue, Jun 12, 2012 at 10:29:13AM -0700, Hossein Rafighi wrote:
 I am not certain if this is mis/configuration on my part, but it
 seems users can only add one attachment when they are replying to a
 ticket using the web interface! Although Add More Files button is
 there, but when you click on it it submits a ticket rather than
 allowing you to add more attachments.
 
 Is this a bug, or misconfig on my part? I am using RT 4.0.0

This is a known bug in the SelfService interface.
I don't believe there is a current branch to correct it unfortunately.

-kevin


pgputYpbHTARG.pgp
Description: PGP signature