Re: [rt-users] Permission causes wrong search-results

2016-06-30 Thread Eierschmalz, Bernhard
Hi,

thanks for your support
NOT LIKE-operator also doesn't work correctly.

I know very well about permissions and search function. I also tried to create 
the search with the assistant - same issue (because the assistant creates the 
same query).

I cannot believe this is a normal issue - because
- if I run the same search with a different user, it works. This is the reason 
why I think the search query is correct
- if I run the same search with = instead of != (or NOT LIKE) operator, it 
works (of course with a different result). This is the reason why I think the 
permissions on the custom field is correct.



best regards
Bernhard



-Ursprüngliche Nachricht-
Von: Bryon Baker [mailto:bba...@copesan.com] 
Gesendet: Donnerstag, 30. Juni 2016 17:20
An: Eierschmalz, Bernhard; martin.whel...@greenhills-it.co.uk
Cc: rt-users@lists.bestpractical.com
Betreff: RE: [rt-users] Permission causes wrong search-results

Hey There I think you need to use 

"NOT LIKE"

IE
Queue = 'General' AND Owner = 'Nobody' AND ('CF.{category}' exists AND 
'CF.{category}' NOT LIKE 'one')

Thanks
Bryon Baker
Network Operations Manager
Copesan - Specialists in Pest Solutions
800-267-3726 Ext. 2296 • 262-783-6261 Ext. 2296 bba...@copesan.com 
www.copesan.com "Servicing North America with Local Care"

-Original Message-
From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Eierschmalz, Bernhard
Sent: Thursday, June 30, 2016 10:03 AM
To: martin.whel...@greenhills-it.co.uk
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Permission causes wrong search-results

Hi,

I'm sorry but this doesn't work - Request tracker sais "wrong query" if I try 
to run the search with "'CF.{category}' exists"

Message is: Wrong query, expecting a OPERATOR in  AND 'CF.{category}' 
>exists<--here'




-Ursprüngliche Nachricht-
Von: Martin Wheldon [mailto:martin.whel...@greenhills-it.co.uk]
Gesendet: Donnerstag, 30. Juni 2016 16:12
An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Permission causes wrong search-results

Hi,

IMO this is working correctly for the following reason, as far as the user is 
concerned the the custom field does not contain the specified value.

For this situation you would need somthing like:

Queue = 'General' AND Owner = 'Nobody' AND ('CF.{category}' exists AND 
'CF.{category}' != 'one')

Best Regards

Martin

On 2016-06-30 10:39, Eierschmalz, Bernhard wrote:
> Hello,
> 
> I'm using RT 4.4.0
> 
> I found the following problem:
> 
> I have a custom field "category" with settings "select one value".
> There are 5 possible values.
> 
> I build a search for all tickets like the following
> 
> Queue = 'General' AND Owner = 'Nobody' AND 'CF.{category}' != 'one'
> 
> I found that the search results ignore the part CF.{category} != 'one'
> and shows all tickets, no matter which category.
> 
> I tested with CF.{category} = 'one' and this works - it shows all the 
> ticket with category 'one'
> 
> I used the same search with root-user, and it always works as expected
> - so I thought this would be a problem with permissions.
> 
> My default-user has the following permissions on this queue:
> 
> "general rights" à all
> 
> "Rights for Staff" à all but "delete tickets" and "forward messages 
> outside of RT"
> 
> "rights for Administrators" à no permissions
> 
> My next try was changing the permissions of the custom field.
> 
> I found out that, as soon as the user has the permission "General 
> rights" à "view custom fields" on the "category"-Custom field, the 
> search is working as expected.
> 
> So in short:
> 
> Search on the CF with = operator works always,
> 
> Search on the CF with != operator works only, if the user has "view 
> custom fields" permission on the custom field.
> 
> So I have a possible solution now, but I would like to understand how 
> this error occurs. Is this a bug or a feature?
> 
> Best regards
> 
> Bernhard
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Permission causes wrong search-results

2016-06-30 Thread Eierschmalz, Bernhard
Hi,

I'm sorry but this doesn't work - Request tracker sais "wrong query" if I try 
to run the search with "'CF.{category}' exists"

Message is: Wrong query, expecting a OPERATOR in  AND 'CF.{category}' 
>exists<--here'




-Ursprüngliche Nachricht-
Von: Martin Wheldon [mailto:martin.whel...@greenhills-it.co.uk] 
Gesendet: Donnerstag, 30. Juni 2016 16:12
An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Permission causes wrong search-results

Hi,

IMO this is working correctly for the following reason, as far as the user is 
concerned the the custom field does not contain the specified value.

For this situation you would need somthing like:

Queue = 'General' AND Owner = 'Nobody' AND ('CF.{category}' exists AND 
'CF.{category}' != 'one')

Best Regards

Martin

On 2016-06-30 10:39, Eierschmalz, Bernhard wrote:
> Hello,
> 
> I'm using RT 4.4.0
> 
> I found the following problem:
> 
> I have a custom field "category" with settings "select one value".
> There are 5 possible values.
> 
> I build a search for all tickets like the following
> 
> Queue = 'General' AND Owner = 'Nobody' AND 'CF.{category}' != 'one'
> 
> I found that the search results ignore the part CF.{category} != 'one'
> and shows all tickets, no matter which category.
> 
> I tested with CF.{category} = 'one' and this works - it shows all the 
> ticket with category 'one'
> 
> I used the same search with root-user, and it always works as expected
> - so I thought this would be a problem with permissions.
> 
> My default-user has the following permissions on this queue:
> 
> "general rights" à all
> 
> "Rights for Staff" à all but "delete tickets" and "forward messages 
> outside of RT"
> 
> "rights for Administrators" à no permissions
> 
> My next try was changing the permissions of the custom field.
> 
> I found out that, as soon as the user has the permission "General 
> rights" à "view custom fields" on the "category"-Custom field, the 
> search is working as expected.
> 
> So in short:
> 
> Search on the CF with = operator works always,
> 
> Search on the CF with != operator works only, if the user has "view 
> custom fields" permission on the custom field.
> 
> So I have a possible solution now, but I would like to understand how 
> this error occurs. Is this a bug or a feature?
> 
> Best regards
> 
> Bernhard
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Los Angeles - September, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Permission causes wrong search-results

2016-06-30 Thread Eierschmalz, Bernhard
Hello,

I'm using RT 4.4.0

I found the following problem:
I have a custom field "category" with settings "select one value". There are 5 
possible values.

I build a search for all tickets like the following
Queue = 'General' AND Owner = 'Nobody' AND 'CF.{category}' != 'one'

I found that the search results ignore the part CF.{category} != 'one' and 
shows all tickets, no matter which category.
I tested with CF.{category} = 'one' and this works - it shows all the ticket 
with category 'one'

I used the same search with root-user, and it always works as expected - so I 
thought this would be a problem with permissions.
My default-user has the following permissions on this queue:
"general rights" --> all
"Rights for Staff" --> all but "delete tickets" and "forward messages outside 
of RT"
"rights for Administrators" --> no permissions

My next try was changing the permissions of the custom field.
I found out that, as soon as the user has the permission "General rights" --> 
"view custom fields" on the "category"-Custom field, the search is working as 
expected.


So in short:
Search on the CF with = operator works always,
Search on the CF with != operator works only, if the user has "view custom 
fields" permission on the custom field.


So I have a possible solution now, but I would like to understand how this 
error occurs. Is this a bug or a feature?

Best regards
Bernhard
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] load Article in mail template

2016-06-27 Thread Eierschmalz, Bernhard
Hello,

I want to include a dynamic advertisement-line into my autoreply (for new 
tickets) - something like the following:

Dear ladies and gentlemen,
Thanks your message - your ticket number is 123456

Best regards

There should be about 5 advertisement-lines - when creating a new ticket, one 
of these lines (by random) should be chosen.
These advertisements should be changed by the marketing-team, without editing 
the program code.

My idea was using articles for this.
Either one article with a "enter multiple values" custom field
or one class with 5 articles (one for each line).

So I would like to create a perl code in the email-template to load one of the 
articles or one of the values of the article.
How can I do this?

Maybe somebody has another idea for this?
Or is there already any extension for this?


Thanks, best regards
Bernhard


-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] on reply "scrips and reipients" is empty on quoted message after Update RT4.4.0

2016-06-16 Thread Eierschmalz, Bernhard
Hello,

I updated my environment from RT 4.2.11 to RT 4.4.0
I'm using RT 4.4.0 on PostgreSQL 9.3

since this update I have the following problem:
when I click on "reply" to a message (with quoting the original message), 
Scrips and Recipients are not shown, so I cannot see who will receive the 
message.
I tested with a lot of HTML-mails - it seems to have to do with the length of 
the original mail.

Can anybody help me with this issue?


Best Regards
Bernhard

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] RT 4.4.0 ShowHistory -> Scroll problem with French GUI

2016-06-14 Thread Eierschmalz, Bernhard
Hi,

I'm using RT 4.4.0 on a PostgreSQL 9.3 database.

Today I activated the option
Set($ShowHistory, 'scroll');

And I ran into a problem with users with French GUI.
When you open a ticket, you should first see "Ticket metadata" and "history"
On the French users, the history is not shown.
When changing the users language or disabling this option, everything works 
fine.

Is there somebody with the same problem?


Best Regards
Bernhard

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Change CF with HTTP

2016-04-13 Thread Eierschmalz, Bernhard
Hi Vinzenz,

thanks so far - I'm not sure if this will work for me.
So let me explain my whole problem, maybe you have a better solution to reach 
help me.

I have a fax-server wich sends faxes as mail into RT. So the mails are always 
with the same content and attached there is a PDF-file with the fax-document.
I have one custom field for my queue called "category"
Our staff need to sort the fax-tickets into different categories, using this 
custom field. (so this team only sorts the tickets - once the ticket is sorted 
into the category, it will appear in another team to work on the ticket)
In the moment, the "sorting staff" have to open one ticket after another, open 
the attached pdf-file, change the CF-value and go to the next ticket.
So the colleagues asked me for an easier way.


My idea was the following:
I create one search for all the unsorted faxes. As format I define like the 
following:
,...
On the column "CategoryA" there should be a link to change custom field of this 
ticket to cagetory A, same for the other categories.
The "high-end-solution" would be also to have directly a link to the attached 
PDF-file from the search - but I don't belive this is possible.


do you think this way will be working? Or do you have another solution for my 
problem?


Best regards
Bernhard

Von: Sinapius, Vinzenz [mailto:vinzenz.sinap...@tracetronic.de]
Gesendet: Mittwoch, 13. April 2016 09:52
An: Eierschmalz, Bernhard
Betreff: AW: Change CF with HTTP

Hi Bernhard,

AFAIK you currently can't update tickets with 
querystrings<https://en.wikipedia.org/wiki/Query_string>. For the REST-API you 
need to put key-value-pairs in the body of a POST 
Request<https://en.wikipedia.org/wiki/POST_(HTTP)>.

You can do this with javascript, here is a function I use in our Instance to 
update the priority of a ticket. You can use this to build something similar 
and attach it to a button or something similar.

function set_ticket_prio(priority, ticket_id){
url = 
"https://ticketserver/rt/REST/1.0/ticket/__id__/edit".replace('__id__', 
ticket_id);
data = 'content=Priority: __prio__'.replace('__prio__', 
priority);
jQuery.ajax({type:"POST", url:url, data:data, success: 
refresh_table});
}

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: Eierschmalz, Bernhard [mailto:bernhard.eierschm...@scheppach.com]
Gesendet: Mittwoch, 13. April 2016 08:16
An: Sinapius, Vinzenz 
<vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>>
Cc: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>
Betreff: AW: Change CF with HTTP

Hi Vinzenz,

Thanks, but I'm not sure how to do this.

I think I have a URL like this:
http:///REST/1.0/ticket//edit<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit>.

but how do I change a CF?

I already tried
http:///REST/1.0/ticket//edit?CF.{}:<CFvalue<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit?CF.%7b%3cCFname%3e%7d:%3cCFvalue>>

and
http:///REST/1.0/ticket//edit?CF.{}=<CFvalue<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit?CF.%7b%3cCFname%3e%7d=%3cCFvalue>>

both didn't work.

Just to make sure what I want:
I need one URL where a user can click and with opening this URL a CF value is 
changed.
Will this work with REST?


Best regards
Bernhard


Von: Sinapius, Vinzenz [mailto:vinzenz.sinap...@tracetronic.de]
Gesendet: Dienstag, 12. April 2016 16:59
An: Eierschmalz, Bernhard
Betreff: AW: Change CF with HTTP

Hi Bernhard,

You can use wget/curl and the REST-API: 
http://requesttracker.wikia.com/wiki/REST

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Eierschmalz, Bernhard
Gesendet: Dienstag, 12. April 2016 14:58
An: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>
Betreff: [rt-users] Change CF with HTTP

Hello,

is it possible to change a CF with a

Re: [rt-users] Change CF with HTTP

2016-04-13 Thread Eierschmalz, Bernhard
Hi Vinzenz,

Thanks, but I'm not sure how to do this.

I think I have a URL like this:
http:///REST/1.0/ticket//edit.

but how do I change a CF?

I already tried
http:///REST/1.0/ticket//edit?CF.{}:<CFvalue<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit?CF.%7b%3cCFname%3e%7d:%3cCFvalue>>

and
http:///REST/1.0/ticket//edit?CF.{}=<CFvalue<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit?CF.%7b%3cCFname%3e%7d=%3cCFvalue>>

both didn't work.

Just to make sure what I want:
I need one URL where a user can click and with opening this URL a CF value is 
changed.
Will this work with REST?


Best regards
Bernhard


Von: Sinapius, Vinzenz [mailto:vinzenz.sinap...@tracetronic.de]
Gesendet: Dienstag, 12. April 2016 16:59
An: Eierschmalz, Bernhard
Betreff: AW: Change CF with HTTP

Hi Bernhard,

You can use wget/curl and the REST-API: 
http://requesttracker.wikia.com/wiki/REST

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Eierschmalz, Bernhard
Gesendet: Dienstag, 12. April 2016 14:58
An: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>
Betreff: [rt-users] Change CF with HTTP

Hello,

is it possible to change a CF with a http command like
http://$ipaddress/rt/Modify.html?id=;CF=;CFval=<customfield-value<http://$ipaddress/rt/Modify.html?id=%3cticketno%3e;CF=%3ccustomfield-ID%3e;CFval=%3ccustomfield-value>>
?

Thank you in advice

Best regards
Bernhard
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Easy way to import a CSV file into ticketing?

2016-04-04 Thread Eierschmalz, Bernhard
Hello Dave,

I import many kinds of CSV-files with bash scripts and rt-cli – maybe this 
would be an idea for you!


Mit freundlichen Grüßen,
Best regards,

Bernhard

Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Dave Florek
Gesendet: Donnerstag, 31. März 2016 21:22
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Easy way to import a CSV file into ticketing?

Good afternoon,

If I have a CSV file full of information that I need to import into RT that's 
not an asset, is there an easy way to do this? I'm looking at the information 
posted in Postgresql for the database, and it looks doable, however I'm not 
sure if I can do it with the UIDs that RT generates.

Any ideas?

Sincerely,
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Tickets from other Ticketsystem

2015-09-14 Thread Eierschmalz, Bernhard
Hello Kevin,

I found a solution on my own now - maybe interesting for somebody.
Quick discription:
1. I recognize the external ticket number with regex from subject and write 
this number to a Custom Field
2. search for existing tickets with same value in same Custom Field and merge 
the tickets

Now how I did: 

Step 1: create a custom field for all queues used for the external ticket 
number.

Step 2: Create the following Scrip:

CustomIsApplicableCode: (at this part we check with if a ticket is created from 
a valid address with a valid regex-syntax for external ticket system)
# only on creating tickets
return 0 unless $self->TransactionObj->Type eq "Create";

my $subject = $self->TransactionObj->Subject;
return 0 unless defined($subject);

# mail-addresses from other ticket systems
my @ticketsender = ('...'); #<-- this is an array of addresses or parts 
of addresses wich are recognized for other ticketsystem-verification.

my $ticketRequestor = lc($self->TicketObj->RequestorAddresses);

if ( $subject =~ / \[plus ticket\d{8}\]/) #<-- regex-code for other 
external ticket numbers in message subject
{
  foreach (@ticketsender)
  {
 if ($ticketRequestor =~ /$_/) #<-- check if sender is permitted
 {
   return 1;
 }
  }
}
return 0; 


CustomPrepareCode (at this part we write the external ticket number to the 
custom field)
my $subject = $self->TransactionObj->Subject;

$subject =~ s/.*\[plus ticket//;
my $cfval = "PLUS".substr($subject,0,8); # <-- cfval contains the Value 
number of the external ticket plus some first letters to identify - this is to 
be able to add more external ticket numbers

# write to CustomField
my $cf = RT::CustomField->new ( $RT::SystemUser );
$cf->Load('21'); #<-- ID of the custom field from step 1
$self->TicketObj->AddCustomFieldValue ( Field => $cf, Value => $cfval );
return 1;



CustomCommitCode (at this part we search for already existing tickets with same 
CF and merge them)


my $extnr = $self->TicketObj->FirstCustomFieldValue('21'); #<-- load 
the custom field value

# find all the ticket  to the reference number from ticketsystem
my $search = new RT::Tickets(RT->SystemUser);
$search->LimitCustomField(CUSTOMFIELD => '21', OPERATOR => '=', VALUE 
=> $extnr);

while (my $ticket = $search->Next)
{
# ignore if finding the new ticket itself
next if $self->TicketObj->Id == $ticket->Id;

my $id = $ticket->Id;

# Logging
$RT::Logger->info("Merging ticket " . $self->TicketObj->Id . " into 
$id because of Reference number $extnr match.");

# merge Tickets
$self->TicketObj->MergeInto($id);
    }


best regards,
Bernhard



-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Eierschmalz, Bernhard
Gesendet: Montag, 11. Mai 2015 10:44
An: rt-users@lists.bestpractical.com
Cc: falc...@bestpractical.com
Betreff: Re: [rt-users] Tickets from other Ticketsystem

Hello Kevin,

I know this is a very old mail below. I didn't install the plugin in this 
times, because it was not so urgent.
But now I have the same problem again.

I read about the extension you mentioned. But I think there is one problem.
What I understood about the extension is:
- when there is a new mail to an existing resolved ticket with defined ticket 
number
- open a new ticket


What I need is the following
- when there is a new mail to a new ticket AND the subject is starting with 
defined syntax
- check if there is any ticket with almost the same subject
- attach the new mail to the existing ticket instead of opening a new one.


So the difference is that the extension searches for a ticket with defined 
number - what I need is to search for any existing ticket with a defined syntax.

Are you sure the extension would work in my case?
Can you tell me how to use it?


Best regards
Bernhard


-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Kevin Falcone
Gesendet: Mittwoch, 3. September 2014 22:34
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Tickets from other Ticketsystem

On Mon, Aug 25, 2014 at 08:27:00AM +, Eierschmalz, Bernhard wrote:
> Hello Kevin,
> 
> I already thought about creating a scrip like
> Condition:
> Transaction obj = "create"
> Subject contains "[plus ticket#"
> 
> Action:
> Search tickets with same plus-ticket no.
> If one exists, combine
> 
> What do you think about this solution

[rt-users] HTML from Article

2015-06-30 Thread Eierschmalz, Bernhard
Hello,

is it possible to use Articles in HTML format (e.g. to design a table from an 
article)?

Best regards
Bernhard


Re: [rt-users] about signatures

2015-06-01 Thread Eierschmalz, Bernhard
Hello Alex,

thanks for your detailed mail. I have one idea to fix the position of 
signature, but for this I need to know one point of configuration.

You wrote:
I don't have an easy answer for moving the quoted text beneath the signature.  
As a desperate measure, your template could try to detect the beginning of 
quoted text and truncate all content after it.  There might be a big risk of 
truncating actual non-quoted content though.

This was the basic for my idea.
My idea is to split the {$Transaction-Content()} part into 2 pieces:

1.   Until “on date name wrote”

2.   After “on date name wrote”

With this splitting I will be able to place the signatures between the 2 parts.

But to provide a stable splitting, I would like to change the syntax of “on … … 
wrote” into some clearly syntax (e.g. with entering a new line with “_” before 
the “on date name wrote” line)
Can you tell me how to do this?


Best regards
Bernhard

Von: Alex Peters [mailto:a...@peters.net]
Gesendet: Montag, 26. Januar 2015 06:29
An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] about signatures

You can use RT templates to add custom signatures to outgoing mail.  The 
template can read details for the user generating the mail, and output them in 
any manner that you wish.

First, you would need to ensure that the necessary information is entered into 
each user's account (Admin  Users  Select).

Second, you would need to create a template (or modify an existing one) to call 
on various elements like:

{ $Transaction-CreatorObj-Name }
{ $Transaction-CreatorObj-WorkPhone }

You might want to include logic to omit the fields (and possibly log an error 
to RT's log) if they are empty for a particular user.

Other methods on the CreatorObj are available here:

https://www.bestpractical.com/docs/rt/4.2/RT/User.html

I don't have an easy answer for moving the quoted text beneath the signature.  
As a desperate measure, your template could try to detect the beginning of 
quoted text and truncate all content after it.  There might be a big risk of 
truncating actual non-quoted content though.


On 21 January 2015 at 17:47, Eierschmalz, Bernhard 
bernhard.eierschm...@scheppach.commailto:bernhard.eierschm...@scheppach.com 
wrote:
Hello,

I have 2 questions about signatures.


1.   For our “non-request-tracker”-mails I have a HTML-Template, to 
standardize all our outgoing email signatures (on the email server runs a 
program that attaches the template with filled in parameters for name phone 
number etc. to every email)
is it possible to use a HTML-Template like this also for emails sent through 
request tracker? (the problem is, the software only sees one email address for 
each queue, so I need to generate the signature directly in RT.



2.   In the moment our signatures are attached under the quoted text; many 
customers complain about this. Is it possible to place the signature between 
message and quoted text?


By the way: we use RT 4.2.8



Best regards,
Bernhard



Re: [rt-users] Tickets from other Ticketsystem

2015-05-11 Thread Eierschmalz, Bernhard
Hello Kevin,

I know this is a very old mail below. I didn't install the plugin in this 
times, because it was not so urgent.
But now I have the same problem again.

I read about the extension you mentioned. But I think there is one problem.
What I understood about the extension is:
- when there is a new mail to an existing resolved ticket with defined ticket 
number
- open a new ticket


What I need is the following
- when there is a new mail to a new ticket AND the subject is starting with 
defined syntax
- check if there is any ticket with almost the same subject
- attach the new mail to the existing ticket instead of opening a new one.


So the difference is that the extension searches for a ticket with defined 
number - what I need is to search for any existing ticket with a defined syntax.

Are you sure the extension would work in my case?
Can you tell me how to use it?


Best regards
Bernhard


-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Kevin Falcone
Gesendet: Mittwoch, 3. September 2014 22:34
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Tickets from other Ticketsystem

On Mon, Aug 25, 2014 at 08:27:00AM +, Eierschmalz, Bernhard wrote:
 Hello Kevin,
 
 I already thought about creating a scrip like
 Condition:
 Transaction obj = create
 Subject contains [plus ticket#
 
 Action:
 Search tickets with same plus-ticket no.
 If one exists, combine
 
 What do you think about this solution? Or would you prefer the strongly 
 modified plugin?
 

Scrip runs after the second ticket is created and sends email.  You then Merge 
it.
The plugin never allows the second ticket to be created.

-kevin

 
 
 -Ursprüngliche Nachricht-
 Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im 
 Auftrag von Kevin Falcone
 Gesendet: Freitag, 22. August 2014 16:01
 An: rt-users@lists.bestpractical.com
 Betreff: Re: [rt-users] Tickets from other Ticketsystem
 
 On Tue, Aug 19, 2014 at 05:36:04AM +, Eierschmalz, Bernhard wrote:
  we have one customer using its own ticket system. This customer 
  sends us mails with an information about his own ticket in the subject.
  
  i.e. [PLUS.DE Ticket#PD077994]
  
  sometimes when this customer answers, he doesn’t send our ticket 
  number in subject, so he opens a new ticket.
  
  Is it possible to identify a mail by this PLUS ticket number and add 
  to our already opened ticket instead of open a new one?
 
 Look at the code in
 https://github.com/bestpractical/rt-extension-repliestoresolved
 
 The function it hooks can be used to lie to RT and return a ticket id of the 
 existing ticket (as opposed to what this extension does, which is suppress 
 the ticket id so that a new ticket will be created).
 
 -kevin
 --
 RT Training - Boston, September 9-10
 http://bestpractical.com/training


[rt-users] Date format using CLI

2015-05-07 Thread Eierschmalz, Bernhard
Hello,

how can I modify the date format using CLI?

When I do the following command:
rt show ticket/1234 -f subject,created


this is the result:
Subject: test
Created: Do 07. Mai 12:02:39 2015


I would preferred a format like
2015-05-07 12:02:39


Is this possible?


Best Regards
Bernhard



[rt-users] let user only logon from one IP

2015-03-26 Thread Eierschmalz, Bernhard
Hello,

is it possible to allow special users (or a special group) only to logon from 
specific IP addresses or specific IP networks?
All other users should still be able to logon from every IP.


Best regards
Bernhard


[rt-users] blank outgoing emails still in RT 4.2.10

2015-03-24 Thread Eierschmalz, Bernhard
Hello,

we had problems with empty outgoing mails from RT. Searching in our log files, 
I found the same error as gilb...@dido.ca had. I found this mail below and 
thought the problem would be solved in RT 4.2.10

Now we have RT 4.2.10 but we still have the same problem. Customers receive an 
empty mail and in the log files I can find the following:
[error]: Failed to downgrade HTML to plain text: Can't call method 
content on an undefined value at 
/usr/local/share/perl/5.18.2/HTML/FormatText/WithLinks/AndTables.pm line 217.
[...]

Now I switched to HTML template and found out that now the outgoing mails are 
OK. But the error messages in the log files are still there.
Should I care about this? When will there be a final solution?


Best regards
Bernhard



-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Alex Vandiver
Gesendet: Donnerstag, 29. Januar 2015 20:50
An: juniorsa
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] RT 4.2.8 reply emails go out blank

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


[rt-users] HTML emails from CLI

2015-03-18 Thread Eierschmalz, Bernhard
Hello,

Is there any way to create Tickets with HTML email from CLI?

Best Regards
Bernhard




[rt-users] Search users with special searches on RT on the glance

2015-03-06 Thread Eierschmalz, Bernhard
Hello,

we have different users with different by-group or globally-saved-searches on 
their own RT at the glance.

In the WebInterface I only can find by user which saved-search is on this users 
RT at the glance.
Is there a way to do this vice versa, so to find by saved-search, on which 
users RT at the glance one specified globally or by-group saved search is?

Best regards
Bernhard


[rt-users] relative date search

2015-03-05 Thread Eierschmalz, Bernhard
Hello,

is it possible to make date-searches in RT with relative date?
For example search all open tickets where creation-date is older than 14 days.


best regards
Bernhard


[rt-users] strange things with multi-value custom field in CLI

2015-02-01 Thread Eierschmalz, Bernhard
Hello,

I have one custom field with type enter multiple values


I tried to create a ticket in CLI and directly enter multiple values into my CF 
with this command:
rt create -t ticket set subject=test queue=test 
CF-42=value1,value2
after this, my CF had one value value1,value2


strange thing is, when I try to edit the CF with this command
rt edit ticket/ticketnumber set CF-42=value1,value2 
status=new

(so exactly the same syntax at CF-42=value1,value2)
I have 2 values, value1 and value2


Can someone explain me, why it is happening like this?
Is there any way directly to create a ticket with multi-value-CF ?


Best regards
Bernhard


[rt-users] custom Template on Create Autoreply to Requestor for spicified queue

2015-01-30 Thread Eierschmalz, Bernhard
Hello,

by default there is a global scrip called on create autoreply to requestor 
which uses one defined template.
I would like to use a different template for one special queue. How can I do 
this?


Mit freundlichen Grüßen,
Best regards,

Bernhard Eierschmalz
IT

Tel. +49 8223 4002-39
Fax +49 8223 4002-1239
Mobil: +49 151 22308260
bernhard.eierschm...@scheppach.commailto:bernhard.eierschm...@scheppach.com
b...@scheppach.com

[Logo]http://www.scheppach.comscheppach Fabrikation von 
Holzbearbeitungmaschinen GmbH
Günzburger Str. 69 | D-89335 Ichenhausen
Tel.: +49 8223 4002-0 | Fax: +49 8223 4002-20
E-Mail: i...@scheppach.com | www.scheppach.com

[facebook]https://www.facebook.com/scheppach.group[xing] 
https://www.xing.com/companies/scheppachgroup  [LinkedIn] 
http://www.linkedin.com/company/scheppach-group[twitter] 
https://twitter.com/ScheppachGroup
Geschäftsführer / Managing Director: Ernst Pfaff, Stephan W. Müller
Registergericht Memmingen HRB 11800

Diese Nachricht enthält vertrauliche und ggf. rechtlich geschützte 
Informationen. Falls Sie nicht der beabsichtigte Empfänger sind, 
benachrichtigen Sie bitte den Absender und löschen Sie diese Nachricht umgehend 
aus Ihrem System. Das unerlaubte Kopieren, die Offenlegung sowie die Weitergabe 
dieser E-Mail sind nicht gestattet.
This email may contain trade secrets or otherwise confidential information. If 
you have received this email in error, please inform the sender immediately and 
destroy the original transmittal. Any unauthorized copying, disclosure or 
distribution is not permitted.



[Scheppach Aktion]http://aktion.scheppach.com




[rt-users] about signatures

2015-01-20 Thread Eierschmalz, Bernhard
Hello,

I have 2 questions about signatures.


1.   For our non-request-tracker-mails I have a HTML-Template, to 
standardize all our outgoing email signatures (on the email server runs a 
program that attaches the template with filled in parameters for name phone 
number etc. to every email)
is it possible to use a HTML-Template like this also for emails sent through 
request tracker? (the problem is, the software only sees one email address for 
each queue, so I need to generate the signature directly in RT.



2.   In the moment our signatures are attached under the quoted text; many 
customers complain about this. Is it possible to place the signature between 
message and quoted text?


By the way: we use RT 4.2.8



Best regards,
Bernhard


[rt-users] running scrip multible times

2014-11-04 Thread Eierschmalz, Bernhard
Hello,

is it possible to run a scrip multiple times?

in my case I want to do something like this:
condition: is some regex-pattern inside of the subject

action: change something and remove this pattern from subject


if this pattern basically is in the subject more than once, the scrip should 
also run more than once. So the easiest way for me would be to re-run the scrip 
- if this pattern is still used in the subject, run the scrip again.


Best regards
Bernhard


-- 
RT Training November 4  5 Los Angeles
http://bestpractical.com/training


Re: [rt-users] problem with ExtractCustomFieldValues Extension

2014-10-06 Thread Eierschmalz, Bernhard
Hello Kevin,

 Are your error logs on debug?  If not, rerun on debug and show the logs.
Can you tell me how to do this?

 Is your email html or plain text?
I tried to create the mail from webinterface (I think this is HTML) and from 
CLI (I think this is plain text)
Both didn't work

 Which part of the mail is ExtractCustomFields searching?
In the mail body.


Best regards,

Bernhard


-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Kevin Falcone
Gesendet: Donnerstag, 2. Oktober 2014 17:04
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] problem with ExtractCustomFieldValues Extension

On Mon, Sep 29, 2014 at 10:00:30AM +, Eierschmalz, Bernhard wrote:
 4.   Create a Ticket with content “Kategorie Service-test” in body 
 through
 WebInterface
 
 5.   It did not work.
 
 In the error logs I cannot find any hint.
  
Are your error logs on debug?  If not, rerun on debug and show the logs.

Is your email html or plain text?
Which part of the mail is ExtractCustomFields searching?  I'll bet if you're 
feeding it html, then it is seeing -gt; not -

-kevin
-- 
RT Training November 4  5 Los Angeles
http://bestpractical.com/training


[rt-users] problem with ExtractCustomFieldValues Extension

2014-09-29 Thread Eierschmalz, Bernhard
Hi all,

I'm trying to install and configure the ExtractCustomFieldValues extension.
What I've done until now is:

1.   Download  Install extension

2.   Create a Template called ExtractCF with following content:

Kategorie Service|Body|Kategorie Service- (.+)$||q|
As you can see Kategorie Service is the name of my CF.


3.   Create a scrip called ExtractCF with condition on create, ation 
Extract Custom Field Values and template ExtractCF



4.   Create a Ticket with content Kategorie Service-test in body through 
WebInterface



5.   It did not work.


In the error logs I cannot find any hint.
What can I do?

Best regards
Bernhard
-- 
RT Training November 4  5 Los Angeles
http://bestpractical.com/training


[rt-users] Drag Drop attache files

2014-08-25 Thread Eierschmalz, Bernhard
Hello,

is there any way to attach files via Drag  Drop to a ticket without the need 
of a comment?

Best regards
Benrhard

-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] Tickets from other Ticketsystem

2014-08-25 Thread Eierschmalz, Bernhard
Hello Kevin,

I already thought about creating a scrip like
Condition:
Transaction obj = create
Subject contains [plus ticket#

Action:
Search tickets with same plus-ticket no.
If one exists, combine

What do you think about this solution? Or would you prefer the strongly 
modified plugin?


Best regards
Bernhard


-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Kevin Falcone
Gesendet: Freitag, 22. August 2014 16:01
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Tickets from other Ticketsystem

On Tue, Aug 19, 2014 at 05:36:04AM +, Eierschmalz, Bernhard wrote:
 we have one customer using its own ticket system. This customer sends 
 us mails with an information about his own ticket in the subject.
 
 i.e. [PLUS.DE Ticket#PD077994]
 
 sometimes when this customer answers, he doesn’t send our ticket 
 number in subject, so he opens a new ticket.
 
 Is it possible to identify a mail by this PLUS ticket number and add 
 to our already opened ticket instead of open a new one?

Look at the code in
https://github.com/bestpractical/rt-extension-repliestoresolved

The function it hooks can be used to lie to RT and return a ticket id of the 
existing ticket (as opposed to what this extension does, which is suppress the 
ticket id so that a new ticket will be created).

-kevin
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] permission to create ticket but deny setting owner

2014-08-20 Thread Eierschmalz, Bernhard
Hello,

I'm creating a customer access to your RT system. Special customers will 
receive RT access and should be able to create tickets. I created a group for 
this customers and set the following permissions on my Queue:
User: create ticket, comment ticket, show queue
Creator: change values for custom field

But on the create-mask this user still sees the Basics and is able to set the 
owner of the new ticket.
How can I avoid this?

I think there are 2 possible solutions:

1.   Hide the basics

2.   Hide only the user


Best regards
Bernhard
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] Tickets from other Ticketsystem

2014-08-18 Thread Eierschmalz, Bernhard
Hello,

we have one customer using its own ticket system. This customer sends us mails 
with an information about his own ticket in the subject.
i.e. [PLUS.DE Ticket#PD077994]

sometimes when this customer answers, he doesn't send our ticket number in 
subject, so he opens a new ticket.
Is it possible to identify a mail by this PLUS ticket number and add to our 
already opened ticket instead of open a new one?

Best regards
bernhard
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] Problems with Table in mail

2014-08-08 Thread Eierschmalz, Bernhard
Thank you, I installed this extension and now it works.

Best regards
Bernhard

Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Joop
Gesendet: Freitag, 8. August 2014 08:17
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Problems with Table in mail

On 8-8-2014 8:02, Alex Peters wrote:
RT aggressively sanitises HTML when displaying ticket content to prevent some 
security issues (like a specially crafted HTML attachment masquerading as part 
of the RT interface).

As of RT v4.2.6 onwards, tables will be shown if the HTML::Gumbo Perl module is 
installed.

On 8 August 2014 15:56, Eierschmalz, Bernhard 
bernhard.eierschm...@scheppach.commailto:bernhard.eierschm...@scheppach.com 
wrote:
Hello,

I'm having problems with tables inside of mails.


There is also the extension PermissiveHTMLMail which will also allow more html 
to be shown and if that is not enough then you can always extend RT to allow 
even more by overriding the methods that scrub the html

Joop
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] attache files directly from Ticket

2014-08-08 Thread Eierschmalz, Bernhard
Hello,

is it possible to attach a file to an answer directly from the ticket's 
attachments? In the moment I only can attach files from local disk.

Best Regards
Bernhard
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] attache files directly from Ticket

2014-08-08 Thread Eierschmalz, Bernhard
Great, thank you - exactly what I searched!


Von: Brumm, Torsten / Kuehne + Nagel / Ham GI-ID 
[mailto:torsten.br...@kuehne-nagel.com]
Gesendet: Freitag, 8. August 2014 09:31
An: Eierschmalz, Bernhard; rt-users@lists.bestpractical.com
Betreff: AW: attache files directly from Ticket

Try this: https://github.com/cloos/RT-Extension-AddAttachmentsFromTransactions

Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Eierschmalz, Bernhard
Gesendet: Freitag, 8. August 2014 09:06
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] attache files directly from Ticket

Hello,

is it possible to attach a file to an answer directly from the ticket's 
attachments? In the moment I only can attach files from local disk.

Best Regards
Bernhard

Kühne + Nagel (AG  Co.) KG
Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE 812773878.
Geschäftsleitung Kühne + Nagel (AG  Co.) KG: Reiner Heiken (Vors.), Dirk 
Blesius, Martin Brinkmann, Holger Ketz, Jan-Hendrik Köstergarten, Christian 
Marnetté, Christian Solf, Jens Wollesen.
Persönlich haftende Gesellschafterin: Kühne  Nagel A.G., Rechtsform: 
Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745, 
Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
Geschäftsleitung Region Westeuropa: Yngve Ruud (Vors.), Hans-Georg Brinkmann 
(Stellv.), Richard Huhn, Björn Johansson, Bruno Mang, Stefan Paul, Tim 
Scharwath, Dominic Edmonds, Peder Winther.

Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen 
Spediteursbedingungen (ADSp), jeweils neuester Fassung. Wir verweisen 
insbesondere auf die vom Gesetz abweichenden Haftungsbeschränkungen von Ziffer 
23 und 24 ADSp. Den vollständigen Text der ADSp übersenden wir Ihnen gerne auf 
Anfrage und können Sie auch unter http://www.kuehne-nagel.com einsehen. 
Ergänzend wird vereinbart, dass (1) Ziffer 27 ADSp im Rahmen internationaler 
Übereinkommen weder unsere Haftung noch die Zurechnung des Verschuldens von 
Leuten und sonstigen Dritten zu Gunsten des Auftraggebers erweitert, und (2) 
wir in den im deutschen Seehandelsrecht aufgeführten Fällen des nautischen 
Verschuldens oder Feuer an Bord nur für eigenes Verschulden und (3) im Sinne 
der CMNI genannten Voraussetzungen nicht für nautisches Verschulden, Feuer an 
Bord oder Mängel des Schiffes haften.
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] Problems with Table in mail

2014-08-07 Thread Eierschmalz, Bernhard
Hello,

I'm having problems with tables inside of mails.

When someone sends a mail with table to create a new ticket, in the history of 
the ticket I cannot see the table, I only see every cell under each other.
When I click on answer- or comment-button, in the new mail the commented table 
is shown correctly.

Even in CLI I see a table. Only not in WebUI History.

is this a bug or is there any way to solve this problem?

Best regards
Bernhard
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] email template

2014-08-05 Thread Eierschmalz, Bernhard
Hello,

is it possible to define email templates for RT?

A little background information:
We use RT for order processes, and we have lots of messages that are nearly 
same (e.g. ‘your order was shipped today with tracking No. 1234’ or ‘please pay 
your invoice of XY € to bank account 12345 with subject order 2345’ ). So you 
see there’s a lot of static content but also lots of variable stuff. Is it 
possible to generate an email template the user can send out?

Before RT they used different Outlook email-Signatures for this. So a 
comparable solution would be great!


Best regards
Bernhard

-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Re: [rt-users] absence planning

2014-07-31 Thread Eierschmalz, Bernhard
Hi Alex,

Yes, it works now! Great!

Now the second step – to check the state.

I think it should be OK when I change my condition to:
return 0 if $self-Status eq 'open';
my $CFval = $self-TicketObj-OwnerObj-FirstCustomFieldValue(27);
return 1 if defined $CFval and $CFval eq 'yes';

right?

How do I manage to run this scrip before “on correspond open tickets” scrip?


Best Regards
Bernhard

Von: Alex Peters [mailto:a...@peters.net]
Gesendet: Donnerstag, 31. Juli 2014 13:26
An: Eierschmalz, Bernhard; rt-users@lists.bestpractical.com
Betreff: Re: AW: [rt-users] absence planning

I believe that the Absent custom field belongs to users rather than tickets.  
If that is correct, your code should read as follows:

my $CFval = $self-TicketObj-OwnerObj-FirstCustomFieldValue(27);
return 1 if defined $CFval and $CFval eq 'Yes';

Note that values are case-sensitive, so a capital Y is required.  Does this 
help?

(P.S.  Please reply-all to ensure that the list remains informed of this 
discussion.)

On 31 July 2014 21:04, Eierschmalz, Bernhard 
bernhard.eierschm...@scheppach.commailto:bernhard.eierschm...@scheppach.com 
wrote:
Hallo Alex,

If I understand correctly you mean when the Custom Field is not set, my $CFval 
will be undefined?
But the custom field for my testuser (who is owner of my test ticket) is set to 
‘no’

Could it be that the type of the custom field matters? I have selected “choose 
one value”. My values are:

Sort

Name

Description

Category

0

Yes

Absent yes

empty

1

No

Absent no

empty




It seems that either your custom field isn't named precisely absent, or 
perhaps you are running an older version of RT which doesn't support loading 
custom fields by name.  If using the ID (27) works for you, it is probably best 
to just use that for now.

It is named absent, and I user RT 4.2.6 – but I think anyway it’s better to use 
the ID.


Best regards
Bernhard

Von: Alex Peters [mailto:a...@peters.netmailto:a...@peters.net]
Gesendet: Donnerstag, 31. Juli 2014 12:28
An: Eierschmalz, Bernhard; 
rt-users@lists.bestpractical.commailto:rt-users@lists.bestpractical.com

Betreff: Re: AW: [rt-users] absence planning

The uninitialized value warnings can be solved by changing the test line:

my $CFval = $self-TicketObj-FirstCustomFieldValue(27);
return 1 if defined $CFval and $CFval eq 'yes';

since when the custom field is not set, $CFval will be undefined.

It seems that either your custom field isn't named precisely absent, or 
perhaps you are running an older version of RT which doesn't support loading 
custom fields by name.  If using the ID (27) works for you, it is probably best 
to just use that for now.

On 31 July 2014 19:50, Eierschmalz, Bernhard 
bernhard.eierschm...@scheppach.commailto:bernhard.eierschm...@scheppach.com 
wrote:
Hello Alex,

your idea with 2 scrips running independent of each other sounds good – I will 
try this.

But first, I still have the problem by loading the CF.
I tried around a little bit – but no solution. I changed my Condition to the 
following:

my $CFval = $self-TicketObj-FirstCustomFieldValue(27);
return 1 if $CFval eq 'yes';

I receive the following failure:
[12166] [Thu Jul 31 09:37:56 2014] [warning]: Use of uninitialized value $CFval 
in string eq at (eval 807) line 2. ((eval 807):2)
[12166] [Thu Jul 31 09:37:58 2014] [warning]: Use of uninitialized value $CFval 
in string eq at (eval 816) line 2. ((eval 816):2)

27 is the ID of my Custom field. When I change to 
FirstCustomFieldValue(‘absent’) I receive the following failure message:

[12166] [Thu Jul 31 09:49:00 2014] [warning]: Couldn't load custom field by 
'absent' identifier (/opt/rt4/sbin/../lib/RT/Record.pm:2231)
[12166] [Thu Jul 31 09:49:00 2014] [warning]: Use of uninitialized value $CFval 
in string eq at (eval 829) line 2. ((eval 829):2)
[12166] [Thu Jul 31 09:49:06 2014] [warning]: Couldn't load custom field by 
'absent' identifier (/opt/rt4/sbin/../lib/RT/Record.pm:2231)
[12166] [Thu Jul 31 09:49:06 2014] [warning]: Use of uninitialized value $CFval 
in string eq at (eval 838) line 2. ((eval 838):2)

What should I do now?


best Regards,
Bernhard

Von: Alex Peters [mailto:a...@peters.netmailto:a...@peters.net]
Gesendet: Freitag, 25. Juli 2014 01:53

An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.commailto:rt-users@lists.bestpractical.com
Betreff: Re: AW: [rt-users] absence planning


I feel that you are overcomplicating your scrip by testing for a status change 
(which is actually a side effect of another scrip), because your primary goal 
is to perform this action when correspondence occurs.

If I were in your position, I would have two scrips in place:

1.  On (correspond AND owner is absent AND ticket is stalled/resolved), set 
owner to Nobody.  Runs first.

2.  On correspond, open inactive tickets.  Runs second.

Actually, in your position I would probably assign an additional Exclusive 
custom field to tickets that when set to true, indicates that the ticket can 
only be worked

[rt-users] absence planning

2014-07-24 Thread Eierschmalz, Bernhard
Hello,

I want to build some absence planning into our RT to avoid that absent users 
receive messages and nobody sees this message. What I'm planning is the 
following:


1.  Creating a user's custom field absent which is yes or no

2.  When a user is absence, this user changes this field to yes, when he's 
back he changes back to no

3.  When the status of one ticket with absent owner (where custom field 
value is yes) changes, the owner show be set to nobody (so the other 
colleagues can find the ticket


so I planned to set up this with a Scrip.
Scrip Action is easy. It's
$self-TicketObj-SetOwner ( $RT::Nobody-id );
Return 1;



What I'm having problems with is Scrip Condition.

For the first step, I tried to run the scrip on any update, so I only have to 
check whether the absent-CF is yes or no
I tried the following line:
return 1 if $self-TicketObj-Owner-Customfields-CustomFieldValue('absent') 
eq yes;

but this isn't working. What is wrong?


A second step will be to check, what exactly was changed (and only run if 
status was changed).
I think I can do this with
return 0 unless $self-TransactionObj-Type eq Status

in front of the other code; am I right?



Best regards,

Bernhard,
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training