[rt-users] Display custom fields in a ticket

2016-03-28 Thread Jeffrey Pilant
Joop wrote:

> Jeffrey Pilant wrote:
> > Could this be a customization of the old system?  If so, what files would 
> > exist
> > to hold the customization?  [I know there is an overload mechanism, and 
> > maybe some
> > config stuff, but I don't recall the details.]  If I could locate the old 
> > file set
> > and look at those files, maybe it will give me an idea to try.
>
> Possible but it could be hidden or it could be obvious.
> If its done well than the customisation should be done in the
> /opt/rt4/local/ tree and it would survive updates. Now its probably not
> a plugin so you could skip looking at the plugins folder but you never
> know. Do you run plugins?
> Anything in the 'lib' or 'html' folder may overrule the same file from
> /opt/rt4/{lib|html} and anything in the callback folder can add/overrule
> parts or anything using the callback mechanism built into RT
> So is anything in it in the old system?
> If it isn't done nicely then things get tricky. Source files can be
> altered directly and finding them could involve getting a diff between
> whats installed now and how a pristine installed tree looks like.
> Looking at modified dates might also be a way to find diffs.
>
> Lets see how far we get this time :-)
>
> Joop

I think I have some customized old system files.  I don't have any .../local 
file
Overrides in the 3.8.4 system.  But based on your info, I found the file
Ticket/Elements/ShowSummary
Which looked to be customized (or at least it shows the text "Custom Fields".

Comparing the two, it is clear that the 4.2.10 version does not have these 
Fields as part of the file.  Below is a DOS diff, showing the differences of 
between the files.  Can you tell me what file(s) I need to create to make a 
local override in the new system, and what you suggest for the contents?  The 
new system is a clean install, so the files should be default values.  Also, 
what other files do I need to look at for these custom fields?  I.e., ticked 
edit, self-service, others

Thanks

/jeff

Files:
  /usr/share/request-tracker3.8/html/Ticket/Elements/ShowSummary
  /opt/rt4/share/html/Ticket/Elements/ShowSummary

Comparing files ShowSummary-3.8.4.txt and SHOWSUMMARY-4.2.10.TXT
* ShowSummary-3.8.4.txt

  <&| /Widgets/TitleBox, title => loc('The Basics'),
title_href => 
RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id,
class => 'ticket-info-basics' &>
<& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
  
% if ($Ticket->CustomFields->First) {
  <&| /Widgets/TitleBox, title => loc('Custom Fields'),
title_href => 
RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id,
class => 'ticket-info-cfs'  &>
<& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
  
% }
  <&| /Widgets/TitleBox, title => loc('People'),
title_href => 
RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id,
class => 'ticket-info-people' &>
<& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
  
  <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => 
$Attachments &>
  <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
* SHOWSUMMARY-4.2.10.TXT
  
% $m->callback( %ARGS, CallbackName => 'LeftColumnTop' );
<&| /Widgets/TitleBox, title => loc('The Basics'),
(($can_modify || $can_modify_cf) ? (title_href => 
RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id) : (
)),
class => 'ticket-info-basics',
&><& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
<& /Elements/ShowCustomFieldCustomGroupings,
Object   => $Ticket,
title_href   => ($can_modify || $can_modify_cf) ? 
RT->Config->Get('WebPath')."/Ticket/Modify.html" : "",
&>
<&| /Widgets/TitleBox, title => loc('People'),
(($can_modify || $can_modify_owner || $can_modify_people) ? (title_href 
=> RT->Config->Get('WebPath')."/Ticket/ModifyPe
ople.html?id=".$Ticket->Id) : ()),
class => 'ticket-info-people',
&><& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
<& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => 
$Attachments &>
% $m->callback( %ARGS, CallbackName => 'AfterAttachments' );
<& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
*

* ShowSummary-3.8.4.txt

% if ( RT->Config->Get('EnableReminders') ) {
* SHOWSUMMARY-4.2.10.TXT
  
% $m->callback( %ARGS, CallbackName => 'RightColumnTop' );
% if ( RT->Config->Get('EnableReminders') ) {
*

* ShowSummary-3.8.4.txt
title_href => 
RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id,
class => 'ticket-info-reminders' &>




  <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted 
=> 0 &>
  
  

Re: [rt-users] Display custom fields in a ticket

2016-03-28 Thread Joop
On 28-3-2016 20:14, Jeffrey Pilant wrote:
> Joop wrote:
>> I just logged into our RT instance to make sure I use the correct terms.
>> Goto the top menu: Admin/CustomFields/Select
>> Make sure you have ticket CFs displayed (Only show custom fields for Field)
>> Select one that is visible in the old system.
>> Now select 'Applies to' from the top right menu
>> There it should show you whether that CF is globally visible or only for
>> selected queues and a list of unselected queues.
> Under this menu path, I get:
> |  Apply Globally
> |  [ ] check this box to apply this Custom Field to all objects.
> |  Selected objects
> |# Name   Description Address  Priority  DefaultDueIn  
> Lifecycle  SubjectTag  Status
> |4 X  Queue for X Issues  -/-  0-0   0 
> defaultEnabled
> |  Unselected objects
So there is atleast one CF that should be visible.

>> Another route would be to select Admin/Queues/Select, select the queue
>> where your CFs aren't visible anymore and then Select 'Custom Fields'
> >from the top right menu. That should give you a list of all CFs that are
>> applicable to that queue.
> Under this menu path, I get:
> |  Selected Custom Fields
> |[ ]  #  Name  Added  Type  Pattern  Status  Move
> |  Unselected Custom Fields
> |[ ]  #  Name  Added  Type  Pattern  Status
This should show some fields if I'm correct but doesn't which if true I
think is odd.

>> You could add a new group add yourself to it and give that group all
>> rights possible. If the CFs show up than its a rights problem, if they
>> don't than you have a problem in the database, you can check with
>> rt-validator.
> In my last email, I mentioned the few rights I did not have.  None looked 
> like they would be controlling this.  I will skip creating an uber group for 
> the moment.
>
> Logging in as administrator on the server, then invoking su to run as root, I 
> get:
> |  InformaticsRT:/opt/rt4/sbin # ./rt-validator -c
> |  [26637] [Mon Mar 28 17:48:58 2016] [info]: Using internal Perl HTML -> 
> text conversion (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1818)
> |  Record #7 in ObjectCustomFieldValues references a nonexistent record in 
> Articles
> |  ObjectId => '1' => id
> |
> |  Record #3 in Links. Value of Base column most probably is an incorrect link
> |  Record #245 in Transactions. Value of NewValue column most probably is an 
> incorrect link
> |  Record #2611 in Transactions. Value of NewValue column most probably is an 
> incorrect link
> |  Record #4 in Links. Value of Target column most probably is an incorrect 
> link
> |  Record #5 in Links. Value of Target column most probably is an incorrect 
> link
> |  Record #3 in Links. Value of Target column most probably is an incorrect 
> link
> |  Record #4 in Links. Value of Base column most probably is an incorrect link
> |  Record #5 in Links. Value of Base column most probably is an incorrect link
> | 
> |  InformaticsRT:/opt/rt4/sbin #
>
> While there are some minor issues, this does not show the level of errors I 
> would expect from a corrupted DB not showing custom fields.
You could trace the records mentioned back to the various tables in the
database but I agree with you that it shouldn't be the cause of the
problems you're having.

>> If you create a new CF does it show up?
> I tried creating a new object.
> It does not show up.
>
>> Joop
> I truly appreciate your assistance.
>
> Could this be a customization of the old system?  If so, what files would 
> exist to hold the customization?  [I know there is an overload mechanism, and 
> maybe some config stuff, but I don't recall the details.]  If I could locate 
> the old file set and look at those files, maybe it will give me an idea to 
> try.
>
Possible but it could be hidden or it could be obvious.
If its done well than the customisation should be done in the
/opt/rt4/local/ tree and it would survive updates. Now its probably not
a plugin so you could skip looking at the plugins folder but you never
know. Do you run plugins?
Anything in the 'lib' or 'html' folder may overrule the same file from
/opt/rt4/{lib|html} and anything in the callback folder can add/overrule
parts or anything using the callback mechanism built into RT
So is anything in it in the old system?
If it isn't done nicely then things get tricky. Source files can be
altered directly and finding them could involve getting a diff between
whats installed now and how a pristine installed tree looks like.
Looking at modified dates might also be a way to find diffs.

Lets see how far we get this time :-)

Joop


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


[rt-users] Display custom fields in a ticket

2016-03-28 Thread Jeffrey Pilant
Joop wrote:
>I just logged into our RT instance to make sure I use the correct terms.
>Goto the top menu: Admin/CustomFields/Select
>Make sure you have ticket CFs displayed (Only show custom fields for Field)
>Select one that is visible in the old system.
>Now select 'Applies to' from the top right menu
>There it should show you whether that CF is globally visible or only for
>selected queues and a list of unselected queues.

Under this menu path, I get:
|  Apply Globally
|  [ ] check this box to apply this Custom Field to all objects.
|  Selected objects
|# Name   Description Address  Priority  DefaultDueIn  
Lifecycle  SubjectTag  Status
|4 X  Queue for X Issues  -/-  0-0   0 default  
  Enabled
|  Unselected objects

>Another route would be to select Admin/Queues/Select, select the queue
>where your CFs aren't visible anymore and then Select 'Custom Fields'
>from the top right menu. That should give you a list of all CFs that are
>applicable to that queue.

Under this menu path, I get:
|  Selected Custom Fields
|[ ]  #  Name  Added  Type  Pattern  Status  Move
|  Unselected Custom Fields
|[ ]  #  Name  Added  Type  Pattern  Status

>You could add a new group add yourself to it and give that group all
>rights possible. If the CFs show up than its a rights problem, if they
>don't than you have a problem in the database, you can check with
>rt-validator.

In my last email, I mentioned the few rights I did not have.  None looked like 
they would be controlling this.  I will skip creating an uber group for the 
moment.

Logging in as administrator on the server, then invoking su to run as root, I 
get:
|  InformaticsRT:/opt/rt4/sbin # ./rt-validator -c
|  [26637] [Mon Mar 28 17:48:58 2016] [info]: Using internal Perl HTML -> text 
conversion (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1818)
|  Record #7 in ObjectCustomFieldValues references a nonexistent record in 
Articles
|  ObjectId => '1' => id
|
|  Record #3 in Links. Value of Base column most probably is an incorrect link
|  Record #245 in Transactions. Value of NewValue column most probably is an 
incorrect link
|  Record #2611 in Transactions. Value of NewValue column most probably is an 
incorrect link
|  Record #4 in Links. Value of Target column most probably is an incorrect link
|  Record #5 in Links. Value of Target column most probably is an incorrect link
|  Record #3 in Links. Value of Target column most probably is an incorrect link
|  Record #4 in Links. Value of Base column most probably is an incorrect link
|  Record #5 in Links. Value of Base column most probably is an incorrect link
| 
|  InformaticsRT:/opt/rt4/sbin #

While there are some minor issues, this does not show the level of errors I 
would expect from a corrupted DB not showing custom fields.

>If you create a new CF does it show up?

I tried creating a new object.
It does not show up.

>Joop

I truly appreciate your assistance.

Could this be a customization of the old system?  If so, what files would exist 
to hold the customization?  [I know there is an overload mechanism, and maybe 
some config stuff, but I don't recall the details.]  If I could locate the old 
file set and look at those files, maybe it will give me an idea to try.

/jeff


The information contained in this e-mail is for the exclusive use of the 
intended recipient(s) and may be confidential, proprietary, and/or 
legally privileged.  Inadvertent disclosure of this message does not 
constitute a waiver of any privilege.  If you receive this message in 
error, please do not directly or indirectly use, print, copy, forward,
or disclose any part of this message.  Please also delete this e-mail 
and all copies and notify the sender.  Thank you. 

For alternate languages please go to http://bayerdisclaimer.bayerweb.com

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