[rt-users] Send mail to create a ticket (error)

2015-01-29 Thread Marisol Rojas
 

Good day,

To request your help to know why not make sending emails to create a new
ticket and in updating data and answer the ticket.

We are just beginning to know RT version we are currently to implement is
the 4.2.9, I hope we can support.

Thanks, Greetings !!

 

 



[rt-users] Retrieving information from RT-database

2015-01-29 Thread Luca Mazzaferro

Dear Users,
I'm writing a pieces of code in Perl to retrieve information directly
from the RT internal database.
I would like to know if there are some API provided by RT to interact 
with the database,

for example retrieve the list of users and so on.
I need this informations out of the web interface.
Thank you.
Cheers,

   Luca M.


[rt-users] Connecting to remote MySQL via SSL

2015-01-29 Thread Nathan Cutler
I have been tasked with migrating our RT database (MySQL) to a remote
server, connection between RT and the database server must be SSL
encrypted.

I see at [1] that DBD::mysql supports SSL, but the RT documentation
[2] seems to imply that RT only supports SSL with PostgreSQL:

$DatabaseRequireSSL

If you're using PostgreSQL and have compiled in SSL support, set
$DatabaseRequireSSL to 1 to turn on SSL communication with the
database.

What is the status of out-of-the-box support for SSL with MySQL in RT 4.2?

Thanks,
Nathan

[1] https://metacpan.org/pod/DBD::mysql#mysql_ssl
[2] https://www.bestpractical.com/docs/rt/4.2/RT_Config.html#DatabaseRequireSSL


[rt-users] XLS report failure

2015-01-29 Thread Boris Epstein
Hello everyone,

I am running RT 4.2.0 on a CentOS 6 machine. Somehow whenever I run a XLS
report (XLS dump of a search) I get the following errors in the log:

[25225] [Thu Jan 29 18:27:26 2015] [error]: Undefined subroutine
RT::SQL::PossibleCustomFields called at
/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
line 80.

Stack:

[/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:680]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:368]
  [/opt/rt4/share/html/autohandler:53]
(/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:211)

Has anybody encounter that? Any know cure?

Thanks.

Boris.


[rt-users] Change Control and approvals

2015-01-29 Thread Matt Wells
I've been looking through the documentation on Approvals and hoped to get a
little user point of view and help.  So far this isn't working.

I have a CCB queue and I've made a template named XYZ-CCB
===Create-Ticket: codereview
Subject: Code review for  {$Tickets{'TOP'}-Subject}
Depended-On-By: {$Tickets{'TOP'}-Id}
Queue: ___Approvals
Type: approval
Content: Someone has created a ticket. you should review and approve it, so
they can finish their work
ENDOFCONTENT

 AdminCC: {
   my $group_name  = 'My-CCB';
   my $groups  = RT::Groups-new( $RT::SystemUser );

   $groups-LimitToUserDefinedGroups();
   $groups-Limit(
 'FIELD'= 'Name',
 'OPERATOR' = '=',
 'VALUE'= $group_name );
   $groups-First-Id;
}


After that I made the script as per the docs -
Condition: On Create
Action: create tickets
Template: XYZ-CCB

I'm rather ignorant on this approvals module but as far as I can tell these
appear to be correct however they are not.  I'm working on getting educated
on these workflows.

To add to it; I'm being asked for 2 levels of approvals.
So the group My-Bosses will approve it and then that of course goes to
My-Security group.  They're the final approval.
So to eat this elephant I'm trying to get the simple single group working.
Has anyone else done multi-group approvals?

As always thank you.


[rt-users] RT 4.2.8 reply emails go out blank

2015-01-29 Thread juniorsa
On certain email replies the mail arrives blank to the recipient.

In syslog 

Jan 27 09:09:37 irf RT: [12747] Use of uninitialized value $_ in
concatenation (.) or string at
/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm line
211.
Jan 27 09:09:37 irf RT: [12747] Failed to downgrade HTML to plain text:
Can't call method content on an undefined value at
/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm line
217.#012#012Stack:#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:217]#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:101]#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:83]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1804]#012 
[/opt/rt4/sbin/../lib/RT/Transaction.pm:348]#012  [template:6]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:556]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:506]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:434]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:414]#012 
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:139]#012 
[/opt/rt4/sbin/../lib/RT/Action/Notify.pm:69]#012 
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:223]#012 
[/opt/rt4/sbin/../lib/RT/Scrip.pm:637]#012 
[/opt/rt4/sbin/../lib/RT/Scrips.pm:358]#012 
[/opt/rt4/sbin/../lib/RT/Transaction.pm:189]#012 
[/opt/rt4/sbin/../lib/RT/Record.pm:1694]#012 
[/opt/rt4/sbin/../lib/RT/Ticket.pm:1617]#012 
[/opt/rt4/sbin/../lib/RT/Ticket.pm:1510]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2343]#012 
[/opt/rt4/share/html/Ticket/Display.html:165]#012 
[/opt/rt4/share/html/Ticket/Update.html:303]#012 
[/opt/rt4/share/html/Ticket/autohandler:66]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:681]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:369]#012 
[/opt/rt4/share/html/autohandler:53]
Jan 27 09:09:37 irf RT: [12747] Use of uninitialized value $_ in
concatenation (.) or string at
/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm line
211.
Jan 27 09:09:37 irf RT: [12747] Failed to downgrade HTML to plain text:
Can't call method content on an undefined value at
/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm line
217.#012#012Stack:#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:217]#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:101]#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:83]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1804]#012 
[/opt/rt4/sbin/../lib/RT/Transaction.pm:348]#012  [template:3]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:556]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:506]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:434]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:414]#012 
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:139]#012 
[/opt/rt4/sbin/../lib/RT/Action/Notify.pm:69]#012 
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:223]#012 
[/opt/rt4/sbin/../lib/RT/Scrip.pm:637]#012 
[/opt/rt4/sbin/../lib/RT/Scrips.pm:358]#012 
[/opt/rt4/sbin/../lib/RT/Transaction.pm:189]#012 
[/opt/rt4/sbin/../lib/RT/Record.pm:1694]#012 
[/opt/rt4/sbin/../lib/RT/Ticket.pm:1617]#012 
[/opt/rt4/sbin/../lib/RT/Ticket.pm:1510]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2343]#012 
[/opt/rt4/share/html/Ticket/Display.html:165]#012 
[/opt/rt4/share/html/Ticket/Update.html:303]#012 
[/opt/rt4/share/html/Ticket/autohandler:66]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:681]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:369]#012 
[/opt/rt4/share/html/autohandler:53]
Jan 27 09:09:37 irf RT: [12747] Use of uninitialized value $_ in
concatenation (.) or string at
/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm line
211.
Jan 27 09:09:37 irf RT: [12747] Failed to downgrade HTML to plain text:
Can't call method content on an undefined value at
/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm line
217.#012#012Stack:#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:217]#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:101]#012 
[/usr/local/share/perl/5.14.2/HTML/FormatText/WithLinks/AndTables.pm:83]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1804]#012 
[/opt/rt4/sbin/../lib/RT/Transaction.pm:348]#012  [template:3]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:556]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:506]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:434]#012 
[/opt/rt4/sbin/../lib/RT/Template.pm:414]#012 
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:139]#012 
[/opt/rt4/sbin/../lib/RT/Action/Notify.pm:69]#012 
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:223]#012 
[/opt/rt4/sbin/../lib/RT/Scrip.pm:637]#012 
[/opt/rt4/sbin/../lib/RT/Scrips.pm:358]#012 
[/opt/rt4/sbin/../lib/RT/Transaction.pm:189]#012 
[/opt/rt4/sbin/../lib/RT/Record.pm:1694]#012 
[/opt/rt4/sbin/../lib/RT/Ticket.pm:1617]#012 
[/opt/rt4/sbin/../lib/RT/Ticket.pm:1510]#012 
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2343]#012 
[/opt/rt4/share/html/Ticket/Display.html:165]#012 

Re: [rt-users] XLS report failure

2015-01-29 Thread Alex Peters
Are you using version 0.08 of the extension?
On 30 Jan 2015 5:30 am, Boris Epstein borepst...@gmail.com wrote:

 Hello everyone,

 I am running RT 4.2.0 on a CentOS 6 machine. Somehow whenever I run a XLS
 report (XLS dump of a search) I get the following errors in the log:

 [25225] [Thu Jan 29 18:27:26 2015] [error]: Undefined subroutine
 RT::SQL::PossibleCustomFields called at
 /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
 line 80.

 Stack:

 [/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:680]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:368]
   [/opt/rt4/share/html/autohandler:53]
 (/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:211)

 Has anybody encounter that? Any know cure?

 Thanks.

 Boris.



Re: [rt-users] Request Tracker

2015-01-29 Thread Alex Vandiver
On Wed, 28 Jan 2015 12:29:00 +0200 Andrius Kulbis
andrius.kul...@ktu.lt wrote:
 Maybe you can look through my question? 
 http://requesttracker.8502.n7.nabble.com/Uploading-image-to-Image-CustomField-via-REST-td59382.html

Support on the mailing list is provided as we have time to provide it.
We support development of RT via support contracts; if you have
need of a line to Best Practical to reliably answer your questions, you
can chat with sa...@bestpractical.com.  Going to personal mail
(repeatedly) is a bit rude -- doing so may _decrease_ the chance that
your question is answered.

Regardless, it looks like the code for setting CF values only deals
with the Value part of a CF, not the LargeContent part, which is
where file upload CF and image CFs are stored.  So no, it looks like it
doesn't.
 - Alex


Re: [rt-users] RT 4.2.8 reply emails go out blank

2015-01-29 Thread Alex Vandiver
On Thu, 29 Jan 2015 11:50:25 -0700 (MST) juniorsa gilb...@dido.ca
wrote:
 On certain email replies the mail arrives blank to the recipient.

This is caused by failure of the HTML - Text rendering engine.  It
triggers on email (or comments/correspondence) which need to be
embedded into plain-text templates; the most common failing case is
HTML that includes tables.

We're testing a branch (4.2/html-external-formatter) which we expect to
be in 4.2.10; it addresses the problem by adding an optional dependency
(HTML::FormatExternal) which uses an external text-only browser
(such as w3m or elinks) to render the HTML to text.

 - Alex


Re: [rt-users] Connecting to remote MySQL via SSL

2015-01-29 Thread Alex Vandiver
On Thu, 29 Jan 2015 10:59:27 +0100 Nathan Cutler
presnyprek...@gmail.com wrote:
 I have been tasked with migrating our RT database (MySQL) to a remote
 server, connection between RT and the database server must be SSL
 encrypted.
 
 I see at [1] that DBD::mysql supports SSL, but the RT documentation
 [2] seems to imply that RT only supports SSL with PostgreSQL:
 
 $DatabaseRequireSSL
 
 If you're using PostgreSQL and have compiled in SSL support, set
 $DatabaseRequireSSL to 1 to turn on SSL communication with the
 database.

From a quick skim of the DBIx::SearchBuilder::Handle code[1], that looks
to add requiressl=1 to the DSN -- which, even on Pg, doesn't do
anything, since the current form is sslmode=require[1].  That option
should die, and be replaced by a more generic one that allows one to
append arbitrary things to the DSN -- particularly as enabling SSL
isn't really an on/off bit, as one needs to talk about verification of
the certificate in order for it to provide any security.

 What is the status of out-of-the-box support for SSL with MySQL in RT
 4.2?

Add a local overlay of RT::Handle::BuildDSN to add the relevant DSN
attributes.  A future release will provide rope to do this without an
overlay.
 - Alex

[1]
https://github.com/bestpractical/dbix-searchbuilder/blob/master/lib/DBIx/SearchBuilder/Handle.pm#L152-L171

[2] https://metacpan.org/pod/DBD::Pg#connect

 Thanks,
 Nathan
 
 [1] https://metacpan.org/pod/DBD::mysql#mysql_ssl
 [2]
 https://www.bestpractical.com/docs/rt/4.2/RT_Config.html#DatabaseRequireSSL



Re: [rt-users] Cancel Resolve transaction based on custom fields

2015-01-29 Thread Alex Vandiver
On Wed, 28 Jan 2015 14:27:22 +0100 Jasper Olbrich
jasper.olbr...@students.uni-marburg.de wrote:
 Is it possible to suppress the status change from open to resolved
 with a scrip or to include the scrip-induced status change in the
 result box?

Unfortunately, neither of these is possible in stock RT.  Scrips can
only run _after_ a chance has happened, and thus have no chance of
preventing it.  They also cannot currently push their results to the
user.
 - Alex


Re: [rt-users] Problem with attachments

2015-01-29 Thread Alex Vandiver
On Wed, 28 Jan 2015 11:53:53 + Guadagnino Cristiano
guadagnino.cristi...@creval.it wrote:
 Unfortunately we send attachments very rarely, so I cannot exactly
 say when this behaviour started. It could be that it started from the
 day I upgraded our installation from 4.2.3 to 4.2.9 (in december), or
 later when I added/upgraded some extensions
 (RT-Extension-Announce-1.00, rt-extension-customfieldsonupdate,
 RT-Extension-SpawnLinkedTicketInQueue-1.01).

You may wish to try disabling those extensions temporarily to see if
that helps resolve the issue.  However, see below.

 I just finished examining RT's log (in debug mode), regarding a test
 ticket I created and then resolved adding an attachment. There is no
 error at all in the log, let  alone a warning message that says
 
 [warning]: Couldn't load object RT::Transaction #0
 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:3026)
 
 but I don't think this is a real problem, since we had have this type
 of message for a long time with no apparent symptoms (please reply if
 I'm wrong).

That warning is extremely worrisome, and I expect the cause of your
problem.  You should run `/opt/rt4/sbin/rt-validator`.

 - Alex


Re: [rt-users] XLS report failure

2015-01-29 Thread Boris Epstein
Thanks for your help Alex!

Do you know if there are any DB changes involved?

Boris.

On Thu, Jan 29, 2015 at 3:38 PM, Alex Peters a...@peters.net wrote:

 You need to upgrade to v0.08, which has explicit support for RT v4.2.
 On 30 Jan 2015 7:01 am, Boris Epstein borepst...@gmail.com wrote:

 According to the PERL code (I am sorry, not sure what the official
 location for the version string is) this is RT-Extension-SearchResults-XLS
 v 0.07.

 Thanks.

 Boris.


 On Thu, Jan 29, 2015 at 2:39 PM, Alex Peters a...@peters.net wrote:

 Are you using version 0.08 of the extension?
 On 30 Jan 2015 5:30 am, Boris Epstein borepst...@gmail.com wrote:

 Hello everyone,

 I am running RT 4.2.0 on a CentOS 6 machine. Somehow whenever I run a
 XLS report (XLS dump of a search) I get the following errors in the log:

 [25225] [Thu Jan 29 18:27:26 2015] [error]: Undefined subroutine
 RT::SQL::PossibleCustomFields called at
 /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
 line 80.

 Stack:

 [/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:680]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:368]
   [/opt/rt4/share/html/autohandler:53]
 (/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:211)

 Has anybody encounter that? Any know cure?

 Thanks.

 Boris.





Re: [rt-users] RT 4.2.8 reply emails go out blank

2015-01-29 Thread Alex Vandiver
On Thu, 29 Jan 2015 15:01:07 -0500 Gilbert Rebeiro gilb...@dido.ca
wrote:
 Is there any work around for now?

Switching to HTML templates is one solution.  This will only mask the
issue somewhat, however, as the plain-text alternative part will be
blank, and the text/html will appear fine.

 How would users know their messages went out blank?

There's a warning in the logs.  The end-users click on the Show
Outgoing Email link, if it's available to them, to see what RT sent
out.

 Any idea on when 4.2.10 will be released?

I expect a release candidate next week, with the official 4.2.10 a
couple weeks thereafter.
 - Alex


Re: [rt-users] XLS report failure

2015-01-29 Thread Alex Peters
You need to upgrade to v0.08, which has explicit support for RT v4.2.
On 30 Jan 2015 7:01 am, Boris Epstein borepst...@gmail.com wrote:

 According to the PERL code (I am sorry, not sure what the official
 location for the version string is) this is RT-Extension-SearchResults-XLS
 v 0.07.

 Thanks.

 Boris.


 On Thu, Jan 29, 2015 at 2:39 PM, Alex Peters a...@peters.net wrote:

 Are you using version 0.08 of the extension?
 On 30 Jan 2015 5:30 am, Boris Epstein borepst...@gmail.com wrote:

 Hello everyone,

 I am running RT 4.2.0 on a CentOS 6 machine. Somehow whenever I run a
 XLS report (XLS dump of a search) I get the following errors in the log:

 [25225] [Thu Jan 29 18:27:26 2015] [error]: Undefined subroutine
 RT::SQL::PossibleCustomFields called at
 /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
 line 80.

 Stack:

 [/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:680]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:368]
   [/opt/rt4/share/html/autohandler:53]
 (/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:211)

 Has anybody encounter that? Any know cure?

 Thanks.

 Boris.





Re: [rt-users] RT 4.2.8 reply emails go out blank

2015-01-29 Thread Gilbert Rebeiro

Is there any work around for now?
How would users know their messages went out blank?
Any suggestions would be great!
Any idea on when 4.2.10 will be released?

Thanks,
Gilbert.

On 1/29/2015 2:49 PM, Alex Vandiver wrote:

On Thu, 29 Jan 2015 11:50:25 -0700 (MST) juniorsa gilb...@dido.ca
wrote:

On certain email replies the mail arrives blank to the recipient.

This is caused by failure of the HTML - Text rendering engine.  It
triggers on email (or comments/correspondence) which need to be
embedded into plain-text templates; the most common failing case is
HTML that includes tables.

We're testing a branch (4.2/html-external-formatter) which we expect to
be in 4.2.10; it addresses the problem by adding an optional dependency
(HTML::FormatExternal) which uses an external text-only browser
(such as w3m or elinks) to render the HTML to text.

  - Alex




Re: [rt-users] XLS report failure

2015-01-29 Thread Alex Peters
I have no personal experience with the plugin but its docs seem to suggest
that none should be necessary.
On 30 Jan 2015 8:01 am, Boris Epstein borepst...@gmail.com wrote:

 Thanks for your help Alex!

 Do you know if there are any DB changes involved?

 Boris.

 On Thu, Jan 29, 2015 at 3:38 PM, Alex Peters a...@peters.net wrote:

 You need to upgrade to v0.08, which has explicit support for RT v4.2.
 On 30 Jan 2015 7:01 am, Boris Epstein borepst...@gmail.com wrote:

 According to the PERL code (I am sorry, not sure what the official
 location for the version string is) this is RT-Extension-SearchResults-XLS
 v 0.07.

 Thanks.

 Boris.


 On Thu, Jan 29, 2015 at 2:39 PM, Alex Peters a...@peters.net wrote:

 Are you using version 0.08 of the extension?
 On 30 Jan 2015 5:30 am, Boris Epstein borepst...@gmail.com wrote:

 Hello everyone,

 I am running RT 4.2.0 on a CentOS 6 machine. Somehow whenever I run a
 XLS report (XLS dump of a search) I get the following errors in the log:

 [25225] [Thu Jan 29 18:27:26 2015] [error]: Undefined subroutine
 RT::SQL::PossibleCustomFields called at
 /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
 line 80.

 Stack:

 [/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:680]
   [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:368]
   [/opt/rt4/share/html/autohandler:53]
 (/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:211)

 Has anybody encounter that? Any know cure?

 Thanks.

 Boris.






Re: [rt-users] Cancel Resolve transaction based on custom fields

2015-01-29 Thread Landon Stewart
On Jan 29, 2015, at 3:05 PM, Landon Stewart lstew...@iweb.com wrote:
 In the action (commit) section of the Scrip:
 $self-TicketObj-Status(open);
 $self-TicketObj-Comment( Content = Script re-opened because 
 CustomFieldName is 
 .$self-TicketObj-FirstCustomFieldValue(CustomFieldName) );

Oops.  Should read Ticket re-opened because...

And it should be followed by:

return 1;


Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Cancel Resolve transaction based on custom fields

2015-01-29 Thread Kevin Falcone
On Thu, Jan 29, 2015 at 03:04:55PM -0500, Alex Vandiver wrote:
 On Wed, 28 Jan 2015 14:27:22 +0100 Jasper Olbrich
 jasper.olbr...@students.uni-marburg.de wrote:
  Is it possible to suppress the status change from open to resolved
  with a scrip or to include the scrip-induced status change in the
  result box?
 
 Unfortunately, neither of these is possible in stock RT.  Scrips can
 only run _after_ a chance has happened, and thus have no chance of
 preventing it.  They also cannot currently push their results to the
 user.

If you merely need has a value rather than has a specific value
you may want
https://metacpan.org/release/RT-Extension-MandatoryOnTransition

Regardless, you may be able to use its code to write your preferred
solution that cancels the Resolve.

-kevin


pgplDf3sO4bdD.pgp
Description: PGP signature


Re: [rt-users] Cancel Resolve transaction based on custom fields

2015-01-29 Thread Landon Stewart
On Jan 28, 2015, at 5:27 AM, Jasper Olbrich 
jasper.olbr...@students.uni-marburg.de wrote:
 
 Hello,
 
 I want to cancel or undo the Mark as Resolved transaction based on the 
 content of custom fields. Currently I'm using a Scrip and I'm only able to do 
 the following:
 
 * access the custom fields
 * make the decision
 * comment on the ticket with the reason why it can't be resolved
 * reopen the ticket
 
 From the ticket's history, I can tell that it is resolved first, then my 
 scrip adds the comment and reopens it. But yellow Results box shows only 
 Status changed from open to resolved.
 
 Is it possible to suppress the status change from open to resolved with a 
 scrip or to include the scrip-induced status change in the result box?

I hope I'm understanding this correctly...

I would use a Scrip with a condition of On Resolve and have the scrip 
evaluate the ticket to see if it should be reopened.  If it should be reopened 
the action portion of the scrip would open the ticket via 
$self-TicketObj-Status(open) again.

Name of Scrip:
On Resolve Reopen if CustomFieldName Contains Some Text

Condition: Select On Resolve

In the preparation section of the Scrip:
return 0 unless $self-TicketObj-FirstCustomFieldValue(CustomFieldName) =~ 
/Some Text/;
return 1;

In the action (commit) section of the Scrip:
$self-TicketObj-Status(open);
$self-TicketObj-Comment( Content = Script re-opened because CustomFieldName 
is .$self-TicketObj-FirstCustomFieldValue(CustomFieldName) );

Maybe?

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932



signature.asc
Description: Message signed with OpenPGP using GPGMail