[rt-users] Assets not linking to privileged users after upgrade to 4.4.0

2016-02-17 Thread John Andersen
I don't know if I missed a step on the upgrade or what (I did to run
etc/upgrade/upgrade-assets).  My assets are working correctly except for
this:

Any asset linked to a privileged user will not show up as an Assigned Asset
on their user page.   As long as they are a non-privileged user, it seems
to work fine (tested with Held By and Ownder),

I'm sure this search error I get in the log is pointing me to the culprit
but not sure what to do in order to fix the issue or how I might have
caused it.

--

Feb 17 18:10:59 rt RT: [19769] Use of uninitialized value
$args{"GroupsAlias"} in hash element at
/opt/rt4/sbin/../lib/RT/SearchBuilder/Role/Roles.pm line 153.

Feb 17 18:10:59 rt RT: [19769] Use of uninitialized value $args{"ALIAS1"}
in concatenation (.) or string at
/usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm line 1086.

Feb 17 18:10:59 rt RT: [19769] Use of uninitialized value in string eq at
/usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm line 1282.

Feb 17 18:10:59 rt RT: [19769] DBD::Pg::st execute failed: ERROR:  syntax
error at or near "."#012LINE 1: ...bled = '0' ) AND (
CachedGroupMembers_3.GroupId = .id ) JOIN...#012
  ^ at
/usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm line 586.

Feb 17 18:10:59 rt RT: [19769] RT::Handle=HASH(0x7f6ca0066e60) couldn't
execute the query 'SELECT COUNT(DISTINCT main.id) FROM Assets main JOIN
CachedGroupMembers CachedGroupMembers_3  ON ( CachedGroupMembers_3.Disabled
= '0' ) AND ( CachedGroupMembers_3.GroupId = .id ) JOIN CachedGroupMembers
CachedGroupMembers_4  ON ( CachedGroupMembers_4.Disabled = '0' ) AND (
CachedGroupMembers_4.GroupId = .id ) JOIN Groups Groups_1  ON (
LOWER(Groups_1.Domain) = 'rt::asset-role' ) AND ( Groups_1.Instance =
main.id ) JOIN CachedGroupMembers CachedGroupMembers_2  ON (
CachedGroupMembers_2.Disabled = '0' ) AND ( CachedGroupMembers_2.GroupId =
Groups_1.id )  WHERE ( ( CachedGroupMembers_2.MemberId = '151821' )  OR  (
CachedGroupMembers_3.MemberId = '3863' )  OR  (
CachedGroupMembers_4.MemberId = '26' ) ) AND (LOWER(main.Status) !=
'deleted') ' at /usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm
line
599.#012#011DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x7f6ca0066e60),
"SELECT COUNT(DISTINCT main.id) FROM Assets main JOIN CachedGr"...) called
at /usr/local/share/perl/5.20.2/DBIx/SearchBuilder.pm line
295#012#011DBIx::SearchBuilder::_DoCount(RT::Assets=HASH(0x7f6cb4236bb0),
1) called at /opt/rt4/sbin/../lib/RT/SearchBuilder.pm line
993#012#011RT::SearchBuilder::_DoCount(RT::Assets=HASH(0x7f6cb4236bb0), 1)
called at /opt/rt4/sbin/../lib/RT/Assets.pm line
293#012#011RT::Assets::_DoCount(RT::Assets=HASH(0x7f6cb4236bb0), 1) called
at /usr/local/share/perl/5.20.2/DBIx/SearchBuilder.pm line
1525#012#011DBIx::SearchBuilder::CountAll(RT::Assets=HASH(0x7f6cb4236bb0))
called at /opt/rt4/share/html/Elements/CollectionList line
54#012#011HTML::Mason::Commands::__ANON__("Collection",
RT::Assets=HASH(0x7f6cb4236bb0), "OrderBy", "id", "Order", "ASC", "Format",
"\x{a}'-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016

[rt-users] Exporting articles help

2016-02-17 Thread Terry O'Leary
Hello,

I am looking to export the current list of articles my company has accrued over 
the years in RT. I thought that there would be some type of easy export tool or 
function within RT that would export all the articles to a CSV or XML file, but 
I could not find one.

I was also thinking that I would be able to simply export the Articles table 
from the MySQL database we have, but the important content in the URI column 
links to "fsck.com-rtfm://ticket/article/#" which is what IO am guessing has 
the content I need to tie in with the article.

I also did sone searching through documentation to see if there was anything 
specific to exporting articles from RT but didn't find anything. Any help is 
much appreciated.

Thank You,
Terry O'Leary

-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016

Re: [rt-users] RT 4.4 - Four questions

2016-02-17 Thread Matt Zagrabelny
On Wed, Feb 17, 2016 at 10:42 AM, Joel Bergmark  wrote:

> Hello there.
>
>
>
> Just updated our RT to 4.4, smoothly as normal regarding RT. However, at a
> meeting with the customer service representatives at our office, I got some
> questions to try to resolve.
>
>
>
> 1: Move signature to the top (basically to reverse the messages from
> newest on top not only in the History view but also inline replys), I have
> tried “SignatureToTheTop” from the wiki and also FlexibleSignature as good
> as that article could be matched but no luck.
>
>
>
> 2: HTML Signatures is it possible to get working? (including logo, links
> and formatting etc)?
>
> 3: Is it possible to disable comments, or in RT 4.4 get them to work as
> replies? (seen old discussions about it but no new ones).
>

Via the ACL'ing. Yes, it should be.


> 4: When replying the WYSIWYGEditor shows the field to write with a
> red/pink hue, is it possible to change that to not be red-ish? (Counter
> intuitive to see red colour where you can write… A matter of education I
> know, but there is a point in it.)
>

CSS perhaps. Under the admin pages there is a location where you can
customize the logo/CSS of the RT install. I'd look there.

-m
-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016

[rt-users] RT 4.4 - Four questions

2016-02-17 Thread Joel Bergmark
Hello there.

Just updated our RT to 4.4, smoothly as normal regarding RT. However, at a 
meeting with the customer service representatives at our office, I got some 
questions to try to resolve.

1: Move signature to the top (basically to reverse the messages from newest on 
top not only in the History view but also inline replys), I have tried 
"SignatureToTheTop" from the wiki and also FlexibleSignature as good as that 
article could be matched but no luck.

2: HTML Signatures is it possible to get working? (including logo, links and 
formatting etc)?
3: Is it possible to disable comments, or in RT 4.4 get them to work as 
replies? (seen old discussions about it but no new ones).
4: When replying the WYSIWYGEditor shows the field to write with a red/pink 
hue, is it possible to change that to not be red-ish? (Counter intuitive to see 
red colour where you can write... A matter of education I know, but there is a 
point in it.)

We are implementing RT4.4 in to a customer service organization as a test to 
see if RT is good enough to work with existing systems and what kind of 
integration level that can be achieved.

Thanks a lot for any assistance regarding this.

Kind regards, Joel T3 Sweden

[Beskrivning: T3]

JOEL BERGMARK
Thirdline support
joel.bergm...@t3.se | www.t3.se
[Beskrivning: 
T3]




-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016

Re: [rt-users] Identify Requestor on Mysql Database

2016-02-17 Thread Matt Zagrabelny
Hi Marcelo,


On Wed, Feb 17, 2016 at 10:02 AM, Marcelo Calado | TBS TAX Services
 wrote:
>
> Hi There!
>
> How can I identify the requestor of the ticket on my mysql database?

There can be zero or more requestors for a ticket.

When a ticket gets created a set of groups gets created for that
ticket. See the "group" table - specifically the "instance", "domain",
and "type" fields.

>From there you can join into the groupmembers table.

-m
-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016


[rt-users] Identify Requestor on Mysql Database

2016-02-17 Thread Marcelo Calado | TBS TAX Services

Hi There!

How can I identify the requestor of the ticket on my mysql database?  On
Tickets table, there is not a field like "requestor"!

Any suggestion is appreciated..

Marcelo Calado





Field   | Type | Null | Key | Default  | Extra
|
+-+--+--+-+--+--
--+
| id  | int(11)  | NO   | PRI | NULL |
auto_increment |
| EffectiveId | int(11)  | NO   | MUL | 0|
|
| IsMerged| smallint(6)  | YES  | | NULL |
|
| Queue   | int(11)  | NO   | MUL | 0|
|
| Type| varchar(16)  | YES  | | NULL |
|
| IssueStatement  | int(11)  | NO   | | 0|
|
| Resolution  | int(11)  | NO   | | 0|
|
| Owner   | int(11)  | NO   | MUL | 0|
|
| Subject | varchar(200) | YES  | | [no subject] |
|
| InitialPriority | int(11)  | NO   | | 0|
|
| FinalPriority   | int(11)  | NO   | | 0|
|
| Priority| int(11)  | NO   | | 0|
|
| TimeEstimated   | int(11)  | NO   | | 0|
|
| TimeWorked  | int(11)  | NO   | | 0|
|
| Status  | varchar(64)  | YES  | | NULL |
|
| TimeLeft| int(11)  | NO   | | 0|
|
| Told| datetime | YES  | | NULL |
|
| Starts  | datetime | YES  | | NULL |
|
| Started | datetime | YES  | | NULL |
|
| Due | datetime | YES  | | NULL |
|
| Resolved| datetime | YES  | | NULL |
|
| LastUpdatedBy   | int(11)  | NO   | | 0|
|
| LastUpdated | datetime | YES  | | NULL |
|
| Creator | int(11)  | NO   | | 0|
|
| Created | datetime | YES  | | NULL |
|
| Disabled| smallint(6)  | NO

-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016


Re: [rt-users] scrip condition on transaction custom field

2016-02-17 Thread Sebastian Juenemann

Hi everyone,

OK - meanwhile i got this issue solved but still have some questions, 
especially about some strange behavior of RT.


The following scenario: I'm resolving a ticket via GUI and setting the 
custom field for this transaction ("FeedbackOnResolve") to "yes". If I 
also leaving a comment (i.e. writing something in the text field) this 
triggers two transactions: first the comment transaction, then the 
status change transaction 9from open to resolved).


1) it should be better commented that $self->TransactionObj in a batch 
scrip (condition) returns the _first_ _triggering/applicable_ 
transaction object. This can get really awkward in the scrip if you 
write several tests and when not everything fits, the the first 
_applicable_ transaction might not be really the _first_ transaction in 
this cascade. So there is limited reliance on this behavior.


2) transaction custom fields (CFS) are somehow attached to 'comment' (or 
correspondence) transactions only. So in order get TCFs working you are 
forced to fill out the text form in order to actually trigger a 
comment/correspondence transaction to which this CF will be attached. 
This also means that if you're searching for specific values on TCFs you 
need to parse through the appropriate transaction type, i.e. 
comment/correspondence.


Or is there another way to trigger TCFs in scrips for other transaction 
types as e.g. 'Status' or 'Set'?  And why do TCFs are not handled like 
ticket CFs (i.e. triggering an own 'CustomField' typed transaction)?


The whole documentary is more or less completely written for ticket CFs, 
which are handled totally different.


3) if anyone is interested the solution for my problem is the following:

my $resolved = 0;
my $feedback = 0;
my $trans_list = $self->TicketObj->TransactionBatch;
my $trans;
foreach my $trans (@$trans_list) {
my $type = $trans->Type;
my $field = $trans->Field;
if ($type eq "Status" || ( $type eq "Set" && $field eq "Status")){
   $resolved = 1 if ($trans->NewValue eq "resolved");
} elsif ($type eq "Comment") {
my $cfvs = $trans->CustomFieldValues("FeedbackOnResolve");
if (my $value = $cfvs->Next()) {
$feedback = 1 if ($value->Content() eq "yes");
}
}
}
return 0 unless $resolved && $feedback;
return 1;

- Sebastian


On 02/17/2016 08:36 AM, Sebastian Juenemann wrote:

Hi everyone,

I have an issue which i can't get resolved without further help by
anyone more experienced RT user/admin.

I want to have a special trigger which can be activated during the
resolving stage on a ticket in order to decide whether an appropriate
message will be sent to the ticket requester or not. Feedback mails to
requester are generally deactivated. The idea is that RT users then can
resolve tickets as normal but if they want that a feedback mail shall be
send they can set the transaction CF to 'yes' and do so explicitly.

For this, I've crated a transaction custom field 'feedback', enabled it
for my queue, with selectable values 'yes' and 'no'. I've then created a
batch scrip (from what I've learned it must be batch if transaction CFs
shall be parsed) which checks for two conditions: 1) ticket was resolved
and 2) transaction CF 'feedback' is set to 'yes'. The first part works
perfectly fine, but i don't get the second part working. I've tried
dozens of different ways two access transactions CFs, but it just wont
work.


So here are some methods which i tried unsuccessfully so far:

1)
return 0 unless $self->TicketObj->FirstCustomFieldValue('feedback') eq
'yes'; # only on ticket CFs?
2)
my $cfs=$txn->CustomFieldValues;
my $cf = $cfs->LimitToCustomField('feedback');
my $response = $cf->Next;
return 0 unless $response->Content eq 'yes';
3)
my $cfvs=$txn->CustomFieldValues;
my $feedback = 0;
while (my $cfv = $cfvs->Next)
{
  my $cfObj = $cfv->CustomFieldObj;
  my $cf_name = $cfObj->Name;
  my $cfv_name = $cfv->Name;
  if ($cf_name eq 'feedback' && $cfv_name eq 'yes') {
 $feedback = 1;
  }
}
return 0 if $feedback == 0;

So my question is: how do i access the transaction CF of my last
transaction (i.e. a resolve transaction = comment + status change to
resolve) in a scrip condition?

I found the documentation on this specific topic (transaction CFs, not
tiecket CFs) quite incomplete and hope some of you will be able to help me.

Many thank sin advance!

- Sebastian





--
Sebastian Jünemann
CeBiTec - Center for Biotechnology
Bielefeld University, D-33594 Bielefeld, Germany
Office: V6-147 -- Phone: +49-(0)521-106-4827
eMail: juene...@cebitec.uni-bielefeld.de
-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016

[rt-users] adding a button/hyperlink to external log analysistool

2016-02-17 Thread it_stuff
thanks for the replies!!! 
The link value works! 
But now I was experimenting with the include page. 
When I use this it seems it loads the whole url (its a url of the RT instance 
with a query) on top of the RT page. menu is broken(double vision effect), and 
the ticketmenu(in the grey menubar changes into the search menu bar...) 

Tried several syntaxes, but I can't seem to get it right... 

this is the url I put in the "include page" field: 

https://RT.domain/Search/Results.html?Format=%27%3Cb%3E%3Ca%20href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Cb%3E%3Ca%20href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0AStatus%2C%0AQueueName%2C%0AOwner%2C%0A%27__NEWLINE__%27&Order=ASC|ASC|ASC|ASC&OrderBy=id|||&Query=CF.{IP}%20%3D%20%27__CustomField__%27%20AND%20%28%20%20Queue%20%3D%20%27General%27%20OR%20Queue%20%3D%20%27Incident%20Reports%27%20OR%20Queue%20%3D%20%27Investigations%20-%20Forensics%27%20OR%20Queue%20%3D%20%27Investigations%20-%20Malware%27%20OR%20Queue%20%3D%20%27Investigations%20-%20Monitoring%27%20%29&RowsPerPage=50&SavedChartSearchId=new&SavedSearchId=new
 

any ideas? 



from RAM 
Hi there, 
That sounds like an end user issue (it sounds like you're not planning on doing 
dev work on RT) [BCC rt-devel to drop]. 
What you want is straight forward and built-in. Look at Admin->Custom 
Fields->Select and click on a custom field; on the Custom Field "Basics" tab 
note the "Link values to" field - the description is pretty clear. 

have fun 
Ram 



from Jesse Maseto: 

Here is an example of how we have done this. 

= 
'http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=__CF.{Community 
Bug}__" target="_blank">__CF.{Community Bug}__/TITLE:Bug', 
= 

We've added this to the Format of a search under the advanced option and added 
the search to a dashboard. 

Hope this helps. 

Best Regards, 
-Jesse 
-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016