[dev] really free text fields

Steve Churchill Steve at luminareconsulting.com
Mon Mar 21 14:59:04 CET 2005


OTRS Dev,

What you're saying makes sense, but I dont have the time right now :)  I'm <extending> the current otrs functionality.  I've pretty much hacked it all out.  

Theres only 2 things that bother me.. if anyone wants to take a look I've supplied the patches

Questions:
  Not sure I need to update w/ TicketRFreeTextGet? (since I'm not using hash arrays, just scalars)

  I've added 2 dtl files for input/output of these fields.  They display differently in some areas.  Its due to the initialization of the objects.  I'm just stuck.  For example AgentUtilities TicketSearch looks fine.  But CustomerTicketSearch doesnt display the form fields!  :/  Any ideas?  

Thanks,

-steve

diff -rch /dev/null otrs.new/Kernel/Output/HTML/Standard/TicketFreeTextOutput.dtl
*** /dev/null   2003-09-15 06:02:32.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/TicketFreeTextInput.dtl     2005-03-21 11:50:41.000000000 -0800
***************
*** 0 ****
--- 1,23 ----
+   <tr>
+     <td>$Text{"Ticket::TicketRFreeText1"}:</td><td>$Data{"TicketRFreeTextField1"}</td>
+   </tr>
+   <tr>
+     <td>$Text{"Ticket::TicketRFreeText2"}:</td><td>$Data{"TicketRFreeTextField2"}</td>
+   </tr>
+   <tr>
+     <td>$Text{"Ticket::TicketRFreeText3"}:</td><td>$Data{"TicketRFreeTextField3"}</td>
+   </tr>
+   <tr>
+     <td>$Data{"TicketFreeKeyField1"}:</td>
+     <td>$Data{"TicketFreeTextField1"} $Text{"Ticket::TicketRFreeText6"}: $Data{"TicketRFreeTextField6"}</td>
+   </tr>
+   <tr>
+     <td>$Text{"Ticket::TicketRFreeText4"}:</td><td>$Data{"TicketRFreeTextField4"}</td>
+   </tr>
+   <tr>
+     <td>$Data{"TicketFreeKeyField2"}:</td>
+     <td>$Data{"TicketFreeTextField2"}</td>
+   </tr>
+   <tr>
+     <td>$Text{"Ticket::TicketRFreeText5"}:</td><td>$Data{"TicketRFreeTextField5"}</td>
+   </tr>
diff -rch /dev/null otrs.new/Kernel/Output/HTML/Standard/TicketFreeTextOutput.dtl
*** /dev/null   2003-09-15 06:02:32.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/TicketFreeTextOutput.dtl       2005-03-21 11:48:47.000000000 -0800
***************
*** 0 ****
--- 1,18 ----
+     <tr>
+       <td valign="top"><b>$Text{"Ticket::TicketRFreeText1"}:</b></td><td> $Data{"TicketRFreeText1"}</td>
+     </tr>
+     <tr>
+       <td valign="top"><b>$Text{"Ticket::TicketRFreeText2"}:</b></td><td> $Data{"TicketRFreeText2"}</td>
+     </tr>
+     <tr>
+       <td valign="top"><b>$Text{"Ticket::TicketRFreeText3"}:</b></td><td> $Data{"TicketRFreeText3"}</td>
+     </tr>
+     <tr>
+       <td valign="top"><b>$Data{"TicketFreeKey1"}:</b></td><td> $Data{"TicketFreeText1"} </td>
+     </tr>
+     <tr>
+       <td valign="top"><b>$Text{"Ticket::TicketRFreeText4"}:</b></td><td> $Data{"TicketRFreeText4"}</td>
+     </tr>
+     <tr>
+       <td valign="top"><b>$Text{"Ticket::TicketRFreeText5"}:</b></td><td> $Data{"TicketRFreeText5"}</td>
+     </tr>
diff -rch otrs.clean/Kernel/Config.pm otrs.new/Kernel/Config.pm
*** otrs.clean/Kernel/Config.pm	2005-03-14 11:36:25.000000000 -0800
--- otrs.new/Kernel/Config.pm	2005-03-17 15:11:08.000000000 -0800
***************
*** 101,114 ****
      $Self->{DefaultLanguage} = 'en';
      $Self->{DefaultCharset} = 'iso-8859-1';
  
! 
  	$Self->{"TicketFreeText1"} = {
  		'' => '-',
! 		'PC' => 'PC',
! 		'Notebook' => 'Notebook',
! 		'LCD' => 'LCD',
! 		'Phone' => 'Phone',
  	};
      # ---------------------------------------------------- #
      # ---------------------------------------------------- #
      #                                                      #
--- 101,146 ----
      $Self->{DefaultLanguage} = 'en';
      $Self->{DefaultCharset} = 'iso-8859-1';
  
! 	# Vendor
! 	$Self->{"TicketFreeKey1"} = {
! 		'Vendor' => 'Vendor',
! 	};
  	$Self->{"TicketFreeText1"} = {
  		'' => '-',
! 		'HP' => 'HP',
! 		'SGI' => 'SGI',
! 		'OTHER' => 'OTHER',
! 	};
! 
! 	# Driver Version
! 	$Self->{"TicketFreeKey2"} = {
! 		'Driver Version' => 'Driver Version',
! 	};
! 	$Self->{"TicketFreeText2"} = {
! 		'' => '-',
! 		'1.0' => '1.0',
! 		'1.1' => '1.1',
  	};
      # ---------------------------------------------------- #
      # ---------------------------------------------------- #
      #                                                      #
diff -rch otrs.clean/Kernel/Language/en.pm otrs.new/Kernel/Language/en.pm
*** otrs.clean/Kernel/Language/en.pm	2004-06-15 02:16:34.000000000 -0700
--- otrs.new/Kernel/Language/en.pm	2005-03-17 15:10:15.000000000 -0800
***************
*** 66,71 ****
--- 66,77 ----
        'History::WebRequestCustomer' => 'Customer request via web.',
        'History::TicketLinkAdd' => 'Added link to ticket "%s".',
        'History::TicketLinkDelete' => 'Deleted link to ticket "%s".',
+       'Ticket::TicketRFreeText1' => 'Application',
+       'Ticket::TicketRFreeText2' => 'Version',
+       'Ticket::TicketRFreeText3' => 'Nodes in Cluster',
+       'Ticket::TicketRFreeText4' => 'Version',
+       'Ticket::TicketRFreeText5' => 'Error Code',
+       'Ticket::TicketRFreeText6' => 'Other',
      );
  
      # $$STOP$$
diff -rch otrs.clean/Kernel/Modules/AgentEmail.pm otrs.new/Kernel/Modules/AgentEmail.pm
*** otrs.clean/Kernel/Modules/AgentEmail.pm	2004-10-08 03:31:12.000000000 -0700
--- otrs.new/Kernel/Modules/AgentEmail.pm	2005-03-21 13:36:48.000000000 -0800
***************
*** 95,100 ****
--- 95,101 ----
              foreach (1..8) {
                  $TicketFreeDefault{'TicketFreeKey'.$_} = $Self->{ConfigObject}->Get('TicketFreeKey'.$_.'::DefaultSelection');
                  $TicketFreeDefault{'TicketFreeText'.$_} = $Self->{ConfigObject}->Get('TicketFreeText'.$_.'::DefaultSelection');
+                 $TicketFreeDefault{'TicketRFreeText'.$_} = $Self->{ConfigObject}->Get('TicketRFreeText'.$_.'::DefaultSelection');
              }
              # get free text config options
              my %TicketFreeText = ();
***************
*** 111,116 ****
--- 112,123 ----
                      Action => $Self->{Action},
                      UserID => $Self->{UserID},
                  );
+                 $TicketFreeText{"TicketRFreeText$_"} = $Self->{TicketObject}->TicketRFreeTextGet(
+                     TicketID => $Self->{TicketID},
+                     Type => "TicketRFreeText$_",
+                     Action => $Self->{Action},
+                     UserID => $Self->{UserID},
+                 );
              }
              my %TicketFreeTextHTML = $Self->{LayoutObject}->AgentFreeText(
                  Config => \%TicketFreeText,
diff -rch otrs.clean/Kernel/Modules/AgentPhone.pm otrs.new/Kernel/Modules/AgentPhone.pm
*** otrs.clean/Kernel/Modules/AgentPhone.pm	2004-10-08 03:31:37.000000000 -0700
--- otrs.new/Kernel/Modules/AgentPhone.pm	2005-03-21 13:36:18.000000000 -0800
***************
*** 124,129 ****
--- 124,130 ----
              foreach (1..8) {
                  $TicketFreeDefault{'TicketFreeKey'.$_} = $Self->{ConfigObject}->Get('TicketFreeKey'.$_.'::DefaultSelection');
                  $TicketFreeDefault{'TicketFreeText'.$_} = $Self->{ConfigObject}->Get('TicketFreeText'.$_.'::DefaultSelection');
+                 $TicketFreeDefault{'TicketRFreeText'.$_} = $Self->{ConfigObject}->Get('TicketRFreeText'.$_.'::DefaultSelection');
              }
              # get free text config options
              my %TicketFreeText = ();
***************
*** 140,145 ****
--- 141,152 ----
                      Type => "TicketFreeText$_",
                      UserID => $Self->{UserID},
                  );
+                 $TicketFreeText{"TicketRFreeText$_"} = $Self->{TicketObject}->TicketRFreeTextGet(
+                     TicketID => $Self->{TicketID},
+                     Action => $Self->{Action},
+                     Type => "TicketRFreeText$_",
+                     UserID => $Self->{UserID},
+                 );
              }
              my %TicketFreeTextHTML = $Self->{LayoutObject}->AgentFreeText(
                  Config => \%TicketFreeText,
diff -rch otrs.clean/Kernel/Modules/AgentUtilities.pm otrs.new/Kernel/Modules/AgentUtilities.pm
*** otrs.clean/Kernel/Modules/AgentUtilities.pm	2004-08-30 07:55:54.000000000 -0700
--- otrs.new/Kernel/Modules/AgentUtilities.pm	2005-03-21 13:51:08.000000000 -0800
***************
*** 119,125 ****
        TicketFreeKey1 TicketFreeText1 TicketFreeKey2 TicketFreeText2
        TicketFreeKey3 TicketFreeText3 TicketFreeKey4 TicketFreeText4
        TicketFreeKey5 TicketFreeText5 TicketFreeKey6 TicketFreeText6
!       TicketFreeKey7 TicketFreeText7 TicketFreeKey8 TicketFreeText8)) {
          # load profile array params (press load profile)
          if (($Self->{Subaction} eq 'LoadProfile' && $Self->{Profile}) || $Self->{TakeLastSearch}) {
              my $SQL = "SELECT profile_value FROM search_profile".
--- 119,127 ----
        TicketFreeKey1 TicketFreeText1 TicketFreeKey2 TicketFreeText2
        TicketFreeKey3 TicketFreeText3 TicketFreeKey4 TicketFreeText4
        TicketFreeKey5 TicketFreeText5 TicketFreeKey6 TicketFreeText6
!       TicketFreeKey7 TicketFreeText7 TicketFreeKey8 TicketFreeText8
!       TicketRFreeText1 TicketRFreeText2 TicketRFreeText3 TicketRFreeText4
!       TicketRFreeText4 TicketRFreeText5 TicketRFreeText6 TicketRFreeText8)) {
          # load profile array params (press load profile)
          if (($Self->{Subaction} eq 'LoadProfile' && $Self->{Profile}) || $Self->{TakeLastSearch}) {
              my $SQL = "SELECT profile_value FROM search_profile".
***************
*** 556,561 ****
--- 558,568 ----
                  Action => $Self->{Action},
                  UserID => $Self->{UserID},
              );
+             $TicketFreeText{"TicketRFreeText$_"} = $Self->{TicketObject}->TicketRFreeTextGet(
+                 Type => "TicketRFreeText$_",
+                 Action => $Self->{Action},
+                 UserID => $Self->{UserID},
+             );
          }
          my %TicketFreeTextHTML = $Self->{LayoutObject}->AgentFreeText(
              NullOption => 1,
diff -rch otrs.clean/Kernel/Modules/CustomerMessage.pm otrs.new/Kernel/Modules/CustomerMessage.pm
*** otrs.clean/Kernel/Modules/CustomerMessage.pm	2004-10-18 01:45:51.000000000 -0700
--- otrs.new/Kernel/Modules/CustomerMessage.pm	2005-03-15 16:21:25.000000000 -0800
***************
*** 129,134 ****
--- 129,135 ----
              foreach (1..8) {
                  $TicketFreeDefault{'TicketFreeKey'.$_} = $Self->{ConfigObject}->Get('TicketFreeKey'.$_.'::DefaultSelection');
                  $TicketFreeDefault{'TicketFreeText'.$_} = $Self->{ConfigObject}->Get('TicketFreeText'.$_.'::DefaultSelection');
+                 $TicketFreeDefault{'TicketRFreeText'.$_} = $Self->{ConfigObject}->Get('TicketRFreeText'.$_);
              }
              # get free text config options
              my %TicketFreeText = ();
***************
*** 145,150 ****
--- 146,157 ----
                      Type => "TicketFreeText$_",
                      UserID => $Self->{UserID},
                  );
+                 $TicketFreeText{"TicketRFreeText$_"} = $Self->{TicketObject}->TicketRFreeTextGet(
+                     TicketID => $Self->{TicketID},
+                     Action => $Self->{Action},
+                     Type => "TicketRFreeText$_",
+                     UserID => $Self->{UserID},
+                 );
              }
              my %TicketFreeTextHTML = $Self->{LayoutObject}->AgentFreeText(
                  Config => \%TicketFreeText,
***************
*** 306,311 ****
--- 313,319 ----
          foreach (1..8) {
              $TicketFree{"TicketFreeKey$_"} =  $Self->{ParamObject}->GetParam(Param => "TicketFreeKey$_");
              $TicketFree{"TicketFreeText$_"} =  $Self->{ParamObject}->GetParam(Param => "TicketFreeText$_");
+             $TicketFree{"TicketRFreeText$_"} =  $Self->{ParamObject}->GetParam(Param => "TicketRFreeText$_");
          }
          my $PriorityID = $Self->{ParamObject}->GetParam(Param => 'PriorityID');
          my $Priority = '';
***************
*** 363,368 ****
--- 371,384 ----
                      UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
                  );
              }
+             if (defined($TicketFree{"TicketRFreeText$_"})) {
+                 $Self->{TicketObject}->TicketRFreeTextSet(
+                     TicketID => $TicketID,
+                     Value => $TicketFree{"TicketRFreeText$_"},
+                     Counter => $_,
+                     UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID'),
+                 );
+             }
            }
            # get attachment
            my %UploadStuff = $Self->{ParamObject}->GetUploadAll(
diff -rch otrs.clean/Kernel/Output/HTML/Agent.pm otrs.new/Kernel/Output/HTML/Agent.pm
*** otrs.clean/Kernel/Output/HTML/Agent.pm	2004-08-19 06:12:45.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Agent.pm	2005-03-15 13:02:26.000000000 -0800
***************
*** 567,572 ****
--- 567,579 ----
                  $Data{"TicketFreeTextField$_"} = '<input type="text" name="TicketFreeText'.$_.'" value="" size="30">';
              }
          }
+         if (defined($Ticket{"TicketRFreeText$_"})) {
+             $Data{"TicketRFreeTextField$_"} = '<input type="text" name="TicketRFreeText'.$_.'" value="'.$Self->{LayoutObject}->Ascii2Html(Text => $Ticket{"TicketRFreeText$_"}).'" size="30">';
+ 	}
+         else {
+             $Ticket{"TicketRFreeText$_"} = '';
+             $Data{"TicketRFreeTextField$_"} = '<input type="text" name="TicketRFreeText'.$_.'" value="" size="30">';
+         }
      }
      return %Data;
  }
diff -rch otrs.clean/Kernel/Output/HTML/Standard/AgentEmailNew.dtl otrs.new/Kernel/Output/HTML/Standard/AgentEmailNew.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/AgentEmailNew.dtl	2004-07-28 03:10:40.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/AgentEmailNew.dtl	2005-03-21 11:39:00.000000000 -0800
***************
*** 145,150 ****
--- 145,151 ----
      <td>$Text{"Bcc"}:</td>
      <td><input type="text" name="Bcc" value="$Data{"Bcc"}" size="70"> <font color="red" size="-2">$Text{"$Data{"Bcc invalid"}"}</font></td>
    </tr>
+ $Include{"TicketFreeTextInput"}
    <tr>
      <td>$Text{"Subject"}:</td>
      <td><input type="text" name="Subject" value="$Data{"Subject"}" size="70"> <font color="red" size="-2">$Text{"$Data{"Subject invalid"}"}</font></td>
diff -rch otrs.clean/Kernel/Output/HTML/Standard/AgentFreeText.dtl otrs.new/Kernel/Output/HTML/Standard/AgentFreeText.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/AgentFreeText.dtl	2003-12-15 12:26:50.000000000 -0800
--- otrs.new/Kernel/Output/HTML/Standard/AgentFreeText.dtl	2005-03-21 12:43:04.000000000 -0800
***************
*** 36,85 ****
  <input type="hidden" name="TicketID" value="$Data{"TicketID"}">
    <table border="0">
    <tr>
!     <td width="20"></td>
      <td>$Text{"Key"}:</td>
      <td>$Text{"Value"}</td>
    </tr>
!   <tr>
!     <td>1</td>
!     <td>$Data{"TicketFreeKeyField1"}:</td>
!     <td>$Data{"TicketFreeTextField1"}</td>
!   </tr>
!   <tr>
!     <td>2</td>
!     <td>$Data{"TicketFreeKeyField2"}:</td>
!     <td>$Data{"TicketFreeTextField2"}</td>
!   </tr>
!   <tr>
!     <td>3</td>
!     <td>$Data{"TicketFreeKeyField3"}:</td>
!     <td>$Data{"TicketFreeTextField3"}</td>
!   </tr>
!   <tr>
!     <td>4</td>
!     <td>$Data{"TicketFreeKeyField4"}:</td>
!     <td>$Data{"TicketFreeTextField4"}</td>
!   </tr>
! #  <tr>
! #    <td>5</td>
! #    <td>$Data{"TicketFreeKeyField5"}:</td>
! #    <td>$Data{"TicketFreeTextField5"}</td>
! #  </tr>
! #  <tr>
! #    <td>6</td>
! #    <td>$Data{"TicketFreeKeyField6"}:</td>
! #    <td>$Data{"TicketFreeTextField6"}</td>
! #  </tr>
! #  <tr>
! #    <td>7</td>
! #    <td>$Data{"TicketFreeKeyField7"}:</td>
! #    <td>$Data{"TicketFreeTextField7"}</td>
! #  </tr>
! #  <tr>
! #    <td>8</td>
! #    <td>$Data{"TicketFreeKeyField8"}:</td>
! #    <td>$Data{"TicketFreeTextField8"}</td>
! #  </tr>
    </table>
  <br>
  <input class="button" type="submit" value="$Text{"update"}">
--- 36,46 ----
  <input type="hidden" name="TicketID" value="$Data{"TicketID"}">
    <table border="0">
    <tr>
! #    <td width="20"></td>
      <td>$Text{"Key"}:</td>
      <td>$Text{"Value"}</td>
    </tr>
! $Include{"TicketFreeTextInput"}
    </table>
  <br>
  <input class="button" type="submit" value="$Text{"update"}">
diff -rch otrs.clean/Kernel/Output/HTML/Standard/AgentPhoneNew.dtl otrs.new/Kernel/Output/HTML/Standard/AgentPhoneNew.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/AgentPhoneNew.dtl	2004-08-19 08:38:50.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/AgentPhoneNew.dtl	2005-03-21 11:36:43.000000000 -0800
***************
*** 131,136 ****
--- 131,137 ----
  <dtl if ($Config{"PhoneViewOwnerSelection"} eq "1") { $Data{"OwnerSelection"} = "<tr><td>$Text{"Owner"}:</td><td>$Data{"OptionStrg"} $Env{"Box0"}<a href="" onclick="document.compose.ExpandCustomerName.value='3'; document.compose.AllUsers.value='1'; document.compose.submit(); return false;" onmouseout="window.status='';" onmouseover="window.status='$Text{"All Agents"}'; return true;">$Text{"All"}</a>$Env{"Box1"}</td></tr>"; }>
      $Data{"OwnerSelection"}
  # --
+ $Include{"TicketFreeTextInput"}
    <tr>
      <td>$Text{"Subject"}:</td>
      <td><input type="text" name="Subject" value="$Data{"Subject"}" size="70"> <font color="red" size="-2">$Text{"$Data{"Subject invalid"}"}</font></td>
diff -rch otrs.clean/Kernel/Output/HTML/Standard/AgentUtilSearch.dtl otrs.new/Kernel/Output/HTML/Standard/AgentUtilSearch.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/AgentUtilSearch.dtl	2004-04-01 01:13:17.000000000 -0800
--- otrs.new/Kernel/Output/HTML/Standard/AgentUtilSearch.dtl	2005-03-21 11:59:45.000000000 -0800
***************
*** 83,120 ****
  <tr align="left">
    <td colspan="2" class="table3">$Text{"TicketFreeText"}</td>
  </tr>
! <tr align="left">
!   <td>$Data{"TicketFreeKeyField1"}</td>
!   <td>$Data{"TicketFreeTextField1"}</td>
! </tr>
! <tr align="left">
!   <td>$Data{"TicketFreeKeyField2"}</td>
!   <td>$Data{"TicketFreeTextField2"}</td>
! </tr>
! <tr align="left">
!   <td>$Data{"TicketFreeKeyField3"}</td>
!   <td>$Data{"TicketFreeTextField3"}</td>
! </tr>
! <tr align="left">
!   <td>$Data{"TicketFreeKeyField4"}</td>
!   <td>$Data{"TicketFreeTextField4"}</td>
! </tr>
! #<tr align="left">
! #  <td>$Data{"TicketFreeKeyField5"}</td>
! #  <td>$Data{"TicketFreeTextField5"}</td>
! #</tr>
! #<tr align="left">
! #  <td>$Data{"TicketFreeKeyField6"}</td>
! #  <td>$Data{"TicketFreeTextField6"}</td>
! #</tr>
! #<tr align="left">
! #  <td>$Data{"TicketFreeKeyField7"}</td>
! #  <td>$Data{"TicketFreeTextField7"}</td>
! #</tr>
! #<tr align="left">
! #  <td>$Data{"TicketFreeKeyField8"}</td>
! #  <td>$Data{"TicketFreeTextField8"}</td>
! #</tr>
  
  <tr align="left">
    <td class="table3" width="50%">$Text{"Priority"}</td>
--- 83,90 ----
  <tr align="left">
    <td colspan="2" class="table3">$Text{"TicketFreeText"}</td>
  </tr>
! 
! $Include{"TicketFreeTextInput"}
  
  <tr align="left">
    <td class="table3" width="50%">$Text{"Priority"}</td>
diff -rch otrs.clean/Kernel/Output/HTML/Standard/AgentZoomBody.dtl otrs.new/Kernel/Output/HTML/Standard/AgentZoomBody.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/AgentZoomBody.dtl	2004-07-16 06:08:02.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/AgentZoomBody.dtl	2005-03-21 12:33:32.000000000 -0800
***************
*** 27,32 ****
--- 27,33 ----
        <td valign="top"><b>$Text{"Created"}:</b></td>
        <td> <div title="$TimeLong{"$Data{"Created"}"}">$TimeLong{"$Data{"Created"}"}</div></td>
      </tr>
+ $Include{"TicketFreeTextOutput"}
  # show the Article::FreeKey1-3 and Article::FreeText1-3
  <!-- dtl:block:ArticleFreeText -->
      <tr>
diff -rch otrs.clean/Kernel/Output/HTML/Standard/AgentZoomStatus.dtl otrs.new/Kernel/Output/HTML/Standard/AgentZoomStatus.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/AgentZoomStatus.dtl	2004-04-22 06:17:23.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/AgentZoomStatus.dtl	2005-03-16 16:05:44.000000000 -0800
***************
*** 68,89 ****
  # --
  # use this if you want to show TicketFreeKey1-8 and TicketFreeText1-8
  # --
! <dtl if ($Data{"TicketFreeText1"} ne "") { $Data{"TicketFreeString1"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey1","25"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText2"} ne "") { $Data{"TicketFreeString2"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey2","25"}:</b></td><td><div title="$QData{"TicketFreeText2"}">$QData{"TicketFreeText2","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText3"} ne "") { $Data{"TicketFreeString3"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey3","25"}:</b></td><td><div title="$QData{"TicketFreeText3"}">$QData{"TicketFreeText3","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText4"} ne "") { $Data{"TicketFreeString4"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey4","25"}:</b></td><td><div title="$QData{"TicketFreeText4"}">$QData{"TicketFreeText4","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText5"} ne "") { $Data{"TicketFreeString5"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey5","25"}:</b></td><td><div title="$QData{"TicketFreeText5"}">$QData{"TicketFreeText5","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText6"} ne "") { $Data{"TicketFreeString6"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey6","25"}:</b></td><td><div title="$QData{"TicketFreeText6"}">$QData{"TicketFreeText6","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText7"} ne "") { $Data{"TicketFreeString7"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey7","25"}:</b></td><td><div title="$QData{"TicketFreeText7"}">$QData{"TicketFreeText7","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeText8"} ne "") { $Data{"TicketFreeString8"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey8","25"}:</b></td><td><div title="$QData{"TicketFreeText8"}">$QData{"TicketFreeText8","25"}</div></td></tr>"; }>
!     $Data{"TicketFreeString1"}
!     $Data{"TicketFreeString2"}
!     $Data{"TicketFreeString3"}
!     $Data{"TicketFreeString4"}
!     $Data{"TicketFreeString5"}
!     $Data{"TicketFreeString6"}
!     $Data{"TicketFreeString7"}
!     $Data{"TicketFreeString8"}
      </table>
  # --
  # show customer info table 
--- 68,89 ----
  # --
  # use this if you want to show TicketFreeKey1-8 and TicketFreeText1-8
  # --
! #<dtl if ($Data{"TicketFreeText1"} ne "") { $Data{"TicketFreeString1"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey1","25"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText2"} ne "") { $Data{"TicketFreeString2"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey2","25"}:</b></td><td><div title="$QData{"TicketFreeText2"}">$QData{"TicketFreeText2","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText3"} ne "") { $Data{"TicketFreeString3"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey3","25"}:</b></td><td><div title="$QData{"TicketFreeText3"}">$QData{"TicketFreeText3","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText4"} ne "") { $Data{"TicketFreeString4"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey4","25"}:</b></td><td><div title="$QData{"TicketFreeText4"}">$QData{"TicketFreeText4","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText5"} ne "") { $Data{"TicketFreeString5"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey5","25"}:</b></td><td><div title="$QData{"TicketFreeText5"}">$QData{"TicketFreeText5","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText6"} ne "") { $Data{"TicketFreeString6"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey6","25"}:</b></td><td><div title="$QData{"TicketFreeText6"}">$QData{"TicketFreeText6","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText7"} ne "") { $Data{"TicketFreeString7"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey7","25"}:</b></td><td><div title="$QData{"TicketFreeText7"}">$QData{"TicketFreeText7","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeText8"} ne "") { $Data{"TicketFreeString8"} = "<tr valign="top"><td><b>$QData{"TicketFreeKey8","25"}:</b></td><td><div title="$QData{"TicketFreeText8"}">$QData{"TicketFreeText8","25"}</div></td></tr>"; }>
! #    $Data{"TicketFreeString1"}
! #    $Data{"TicketFreeString2"}
! #    $Data{"TicketFreeString3"}
! #    $Data{"TicketFreeString4"}
! #    $Data{"TicketFreeString5"}
! #    $Data{"TicketFreeString6"}
! #    $Data{"TicketFreeString7"}
! #    $Data{"TicketFreeString8"}
      </table>
  # --
  # show customer info table 
diff -rch otrs.clean/Kernel/Output/HTML/Standard/CustomerMessageNew.dtl otrs.new/Kernel/Output/HTML/Standard/CustomerMessageNew.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/CustomerMessageNew.dtl	2004-04-29 04:18:32.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/CustomerMessageNew.dtl	2005-03-21 11:31:56.000000000 -0800
***************
*** 53,58 ****
--- 53,59 ----
    <tr>
      <td>$Text{"To"}:</td><td>$Data{"ToStrg"}</td>
    </tr>
+ $Include{"TicketFreeTextInput"}
    <tr>
      <td>$Text{"Subject"}:</td><td><input type="text" name="Subject" value="$QData{"Subject"}" size="60"></td>
    </tr>
***************
*** 68,77 ****
  <dtl if ($Config{"CustomerPriority"} ne "0") { $Data{"PriorityString"} = "<tr><td>$Text{"Priority"}:</td><td> $Data{"PriorityStrg"}</td></tr>"; }>
    $Data{"PriorityString"}
  #  <tr>
- #    <td>$Data{"TicketFreeKeyField1"}:</td>
- #    <td>$Data{"TicketFreeTextField1"}</td>
- #  </tr>
- #  <tr>
  #    <td>$Data{"TicketFreeKeyField2"}:</td>
  #    <td>$Data{"TicketFreeTextField2"}</td>
  #  </tr>
--- 69,74 ----
diff -rch otrs.clean/Kernel/Output/HTML/Standard/CustomerTicketSearch.dtl otrs.new/Kernel/Output/HTML/Standard/CustomerTicketSearch.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/CustomerTicketSearch.dtl	2004-06-22 03:04:23.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/CustomerTicketSearch.dtl	2005-03-21 11:56:20.000000000 -0800
***************
*** 45,50 ****
--- 45,51 ----
    <td>$Text{"Cc"}</td>
    <td><input type="text" name="Cc" size="30" value="$QData{"Cc"}"></td>
  </tr>
+ $Include{"TicketFreeTextInput"}
  <tr align="left">
    <td>$Text{"Subject"}</td>
    <td><input type="text" name="Subject" size="30" value="$QData{"Subject"}"></td>
diff -rch otrs.clean/Kernel/Output/HTML/Standard/CustomerTicketZoom.dtl otrs.new/Kernel/Output/HTML/Standard/CustomerTicketZoom.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/CustomerTicketZoom.dtl	2004-04-29 04:18:32.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/CustomerTicketZoom.dtl	2005-03-21 11:44:56.000000000 -0800
***************
*** 73,78 ****
--- 73,79 ----
        <td valign="top"><b>$Text{"Subject"}:</b></td>
        <td> $QData{"Article::Subject","200"}</td>
      </tr>
+ $Include{"TicketFreeTextOutput"}
  # --
  # show the Article::FreeKey1-3 and Article::FreeValue1-3
  # --
***************
*** 154,175 ****
  # --
  # use this if you want to show TicketFreeKey1-2 and TicketFreeValue1-2
  # --
! <dtl if ($Data{"TicketFreeKey1"} ne "") { $Data{"TicketFreeString1"} = "<tr><td><b>$QData{"TicketFreeKey1","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey2"} ne "") { $Data{"TicketFreeString2"} = "<tr><td><b>$QData{"TicketFreeKey2","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText2","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey3"} ne "") { $Data{"TicketFreeString3"} = "<tr><td><b>$QData{"TicketFreeKey3","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText3","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey4"} ne "") { $Data{"TicketFreeString4"} = "<tr><td><b>$QData{"TicketFreeKey4","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText4","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey5"} ne "") { $Data{"TicketFreeString5"} = "<tr><td><b>$QData{"TicketFreeKey5","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText5","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey6"} ne "") { $Data{"TicketFreeString6"} = "<tr><td><b>$QData{"TicketFreeKey6","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText6","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey7"} ne "") { $Data{"TicketFreeString7"} = "<tr><td><b>$QData{"TicketFreeKey7","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText7","20"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey8"} ne "") { $Data{"TicketFreeString8"} = "<tr><td><b>$QData{"TicketFreeKey8","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText8","20"}</div></td></tr>"; }>
!     $Data{"TicketFreeString1"}
!     $Data{"TicketFreeString2"}
!     $Data{"TicketFreeString3"}
!     $Data{"TicketFreeString4"}
!     $Data{"TicketFreeString5"}
!     $Data{"TicketFreeString6"}
!     $Data{"TicketFreeString7"}
!     $Data{"TicketFreeString8"}
      </table>
  
    </td>
--- 155,176 ----
  # --
  # use this if you want to show TicketFreeKey1-2 and TicketFreeValue1-2
  # --
! #<dtl if ($Data{"TicketFreeKey1"} ne "") { $Data{"TicketFreeString1"} = "<tr><td><b>$QData{"TicketFreeKey1","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey2"} ne "") { $Data{"TicketFreeString2"} = "<tr><td><b>$QData{"TicketFreeKey2","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText2","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey3"} ne "") { $Data{"TicketFreeString3"} = "<tr><td><b>$QData{"TicketFreeKey3","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText3","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey4"} ne "") { $Data{"TicketFreeString4"} = "<tr><td><b>$QData{"TicketFreeKey4","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText4","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey5"} ne "") { $Data{"TicketFreeString5"} = "<tr><td><b>$QData{"TicketFreeKey5","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText5","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey6"} ne "") { $Data{"TicketFreeString6"} = "<tr><td><b>$QData{"TicketFreeKey6","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText6","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey7"} ne "") { $Data{"TicketFreeString7"} = "<tr><td><b>$QData{"TicketFreeKey7","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText7","20"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey8"} ne "") { $Data{"TicketFreeString8"} = "<tr><td><b>$QData{"TicketFreeKey8","20"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText8","20"}</div></td></tr>"; }>
! #    $Data{"TicketFreeString1"}
! #    $Data{"TicketFreeString2"}
! #    $Data{"TicketFreeString3"}
! #    $Data{"TicketFreeString4"}
! #    $Data{"TicketFreeString5"}
! #    $Data{"TicketFreeString6"}
! #    $Data{"TicketFreeString7"}
! #    $Data{"TicketFreeString8"}
      </table>
  
    </td>
diff -rch otrs.clean/Kernel/Output/HTML/Standard/TicketView.dtl otrs.new/Kernel/Output/HTML/Standard/TicketView.dtl
*** otrs.clean/Kernel/Output/HTML/Standard/TicketView.dtl	2004-07-16 06:07:30.000000000 -0700
--- otrs.new/Kernel/Output/HTML/Standard/TicketView.dtl	2005-03-21 11:44:29.000000000 -0800
***************
*** 77,84 ****
      <tr>
        <td valign="top" width="15%"><b>$QData{"Key"}:</b></td>
        <td width="85%"> <div title="$QData{"Value"}">$QData{"Value","80"}</div></td>
!     </tr>
  <!-- dtl:block:ArticleFreeText -->
  # --
  # show FreeKey1-3 and FreeText1-3 (in other way like the block, so you could add link or somethin else)
  # --
--- 78,86 ----
      <tr>
        <td valign="top" width="15%"><b>$QData{"Key"}:</b></td>
        <td width="85%"> <div title="$QData{"Value"}">$QData{"Value","80"}</div></td>
!    </tr>
  <!-- dtl:block:ArticleFreeText -->
+ $Include{"TicketFreeTextOutput"}
  # --
  # show FreeKey1-3 and FreeText1-3 (in other way like the block, so you could add link or somethin else)
  # --
***************
*** 136,157 ****
  # --
  # show TicketFreeKey1-2 and TicketFreeText1-2
  # --
! <dtl if ($Data{"TicketFreeKey1"} ne "") { $Data{"TicketFreeString1"} = "<tr><td><b>$QData{"TicketFreeKey1","25"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey2"} ne "") { $Data{"TicketFreeString2"} = "<tr><td><b>$QData{"TicketFreeKey2","25"}:</b></td><td><div title="$QData{"TicketFreeText2"}">$QData{"TicketFreeText2","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey3"} ne "") { $Data{"TicketFreeString3"} = "<tr><td><b>$QData{"TicketFreeKey3","25"}:</b></td><td><div title="$QData{"TicketFreeText3"}">$QData{"TicketFreeText3","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey4"} ne "") { $Data{"TicketFreeString4"} = "<tr><td><b>$QData{"TicketFreeKey4","25"}:</b></td><td><div title="$QData{"TicketFreeText4"}">$QData{"TicketFreeText4","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey5"} ne "") { $Data{"TicketFreeString5"} = "<tr><td><b>$QData{"TicketFreeKey5","25"}:</b></td><td><div title="$QData{"TicketFreeText5"}">$QData{"TicketFreeText5","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey6"} ne "") { $Data{"TicketFreeString6"} = "<tr><td><b>$QData{"TicketFreeKey6","25"}:</b></td><td><div title="$QData{"TicketFreeText6"}">$QData{"TicketFreeText6","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey7"} ne "") { $Data{"TicketFreeString7"} = "<tr><td><b>$QData{"TicketFreeKey7","25"}:</b></td><td><div title="$QData{"TicketFreeText7"}">$QData{"TicketFreeText7","25"}</div></td></tr>"; }>
! <dtl if ($Data{"TicketFreeKey8"} ne "") { $Data{"TicketFreeString8"} = "<tr><td><b>$QData{"TicketFreeKey8","25"}:</b></td><td><div title="$QData{"TicketFreeText8"}">$QData{"TicketFreeText8","25"}</div></td></tr>"; }>
!     $Data{"TicketFreeString1"}
!     $Data{"TicketFreeString2"}
!     $Data{"TicketFreeString3"}
!     $Data{"TicketFreeString4"}
!     $Data{"TicketFreeString5"}
!     $Data{"TicketFreeString6"}
!     $Data{"TicketFreeString7"}
!     $Data{"TicketFreeString8"}
  # --
     </table>
  
--- 138,159 ----
  # --
  # show TicketFreeKey1-2 and TicketFreeText1-2
  # --
! #<dtl if ($Data{"TicketFreeKey1"} ne "") { $Data{"TicketFreeString1"} = "<tr><td><b>$QData{"TicketFreeKey1","25"}:</b></td><td><div title="$QData{"TicketFreeText1"}">$QData{"TicketFreeText1","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey2"} ne "") { $Data{"TicketFreeString2"} = "<tr><td><b>$QData{"TicketFreeKey2","25"}:</b></td><td><div title="$QData{"TicketFreeText2"}">$QData{"TicketFreeText2","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey3"} ne "") { $Data{"TicketFreeString3"} = "<tr><td><b>$QData{"TicketFreeKey3","25"}:</b></td><td><div title="$QData{"TicketFreeText3"}">$QData{"TicketFreeText3","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey4"} ne "") { $Data{"TicketFreeString4"} = "<tr><td><b>$QData{"TicketFreeKey4","25"}:</b></td><td><div title="$QData{"TicketFreeText4"}">$QData{"TicketFreeText4","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey5"} ne "") { $Data{"TicketFreeString5"} = "<tr><td><b>$QData{"TicketFreeKey5","25"}:</b></td><td><div title="$QData{"TicketFreeText5"}">$QData{"TicketFreeText5","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey6"} ne "") { $Data{"TicketFreeString6"} = "<tr><td><b>$QData{"TicketFreeKey6","25"}:</b></td><td><div title="$QData{"TicketFreeText6"}">$QData{"TicketFreeText6","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey7"} ne "") { $Data{"TicketFreeString7"} = "<tr><td><b>$QData{"TicketFreeKey7","25"}:</b></td><td><div title="$QData{"TicketFreeText7"}">$QData{"TicketFreeText7","25"}</div></td></tr>"; }>
! #<dtl if ($Data{"TicketFreeKey8"} ne "") { $Data{"TicketFreeString8"} = "<tr><td><b>$QData{"TicketFreeKey8","25"}:</b></td><td><div title="$QData{"TicketFreeText8"}">$QData{"TicketFreeText8","25"}</div></td></tr>"; }>
! #    $Data{"TicketFreeString1"}
! #    $Data{"TicketFreeString2"}
! #    $Data{"TicketFreeString3"}
! #    $Data{"TicketFreeString4"}
! #    $Data{"TicketFreeString5"}
! #    $Data{"TicketFreeString6"}
! #    $Data{"TicketFreeString7"}
! #    $Data{"TicketFreeString8"}
  # --
     </table>
  
diff -rch otrs.clean/Kernel/System/Ticket/Article.pm otrs.new/Kernel/System/Ticket/Article.pm
*** otrs.clean/Kernel/System/Ticket/Article.pm	2004-10-14 08:17:54.000000000 -0700
--- otrs.new/Kernel/System/Ticket/Article.pm	2005-03-15 17:29:28.000000000 -0800
***************
*** 854,860 ****
          " sa.incoming_time, sa.id, st.freekey1, st.freetext1, st.freekey2, st.freetext2,".
          " st.freekey3, st.freetext3, st.freekey4, st.freetext4,".
          " st.freekey5, st.freetext5, st.freekey6, st.freetext6,".
!         " st.freekey7, st.freetext7, st.freekey8, st.freetext8, st.ticket_lock_id".
          " FROM ".
          " article sa, ticket st, ".
          " $Self->{ConfigObject}->{DatabaseUserTable} su ".
--- 854,862 ----
          " sa.incoming_time, sa.id, st.freekey1, st.freetext1, st.freekey2, st.freetext2,".
          " st.freekey3, st.freetext3, st.freekey4, st.freetext4,".
          " st.freekey5, st.freetext5, st.freekey6, st.freetext6,".
!         " st.freekey7, st.freetext7, st.freekey8, st.freetext8, st.ticket_lock_id,".
!         " st.rfreetext1, st.rfreetext2, st.rfreetext3, st.rfreetext4, ".
!         " st.rfreetext5, st.rfreetext6, st.rfreetext7, st.rfreetext8 ".
          " FROM ".
          " article sa, ticket st, ".
          " $Self->{ConfigObject}->{DatabaseUserTable} su ".
***************
*** 950,955 ****
--- 952,965 ----
          $Data{TicketFreeText7} = $Row[45];
          $Data{TicketFreeKey8} = $Row[46];
          $Data{TicketFreeText8} = $Row[47];
+         $Ticket{TicketRFreeText1} = defined($Row[49]) ? $Row[49] : '';
+         $Ticket{TicketRFreeText2} = defined($Row[50]) ? $Row[50] : '';
+         $Ticket{TicketRFreeText3} = defined($Row[51]) ? $Row[51] : '';
+         $Ticket{TicketRFreeText4} = defined($Row[52]) ? $Row[52] : '';
+         $Ticket{TicketRFreeText5} = defined($Row[53]) ? $Row[53] : '';
+         $Ticket{TicketRFreeText6} = defined($Row[54]) ? $Row[54] : '';
+         $Ticket{TicketRFreeText7} = defined($Row[55]) ? $Row[55] : '';
+         $Ticket{TicketRFreeText8} = defined($Row[56]) ? $Row[56] : '';
          $Data{IncomingTime} = $Row[30];
          $Data{RealTillTimeNotUsed} = $Row[17];
          $Ticket{LockID} = $Row[48];
diff -rch otrs.clean/Kernel/System/Ticket.pm otrs.new/Kernel/System/Ticket.pm
*** otrs.clean/Kernel/System/Ticket.pm	2004-09-08 17:18:09.000000000 -0700
--- otrs.new/Kernel/System/Ticket.pm	2005-03-21 13:48:26.000000000 -0800
***************
*** 509,514 ****
--- 509,516 ----
          " st.freekey3, st.freetext3, st.freekey4, st.freetext4,".
          " st.freekey5, st.freetext5, st.freekey6, st.freetext6,".
          " st.freekey7, st.freetext7, st.freekey8, st.freetext8, ".
+         " st.rfreetext1, st.rfreetext2, st.rfreetext3, st.rfreetext4, ".
+         " st.rfreetext5, st.rfreetext6, st.rfreetext7, st.rfreetext8, ".
          " st.change_time ".
          " FROM ".
          " ticket st, ticket_priority sp, ".
***************
*** 560,565 ****
--- 562,583 ----
          $Ticket{TicketFreeText7} = defined($Row[31]) ? $Row[31] : '';
          $Ticket{TicketFreeKey8} = defined($Row[32]) ? $Row[32] : '';
          $Ticket{TicketFreeText8} = defined($Row[33]) ? $Row[33] : '';
+         $Ticket{TicketRFreeText1} = defined($Row[34]) ? $Row[34] : '';
+         $Ticket{TicketRFreeText1} = defined($Row[34]) ? $Row[34] : '';
+         $Ticket{TicketRFreeText2} = defined($Row[35]) ? $Row[35] : '';
+         $Ticket{TicketRFreeText3} = defined($Row[36]) ? $Row[36] : '';
+         $Ticket{TicketRFreeText4} = defined($Row[37]) ? $Row[37] : '';
+         $Ticket{TicketRFreeText5} = defined($Row[38]) ? $Row[38] : '';
+         $Ticket{TicketRFreeText6} = defined($Row[39]) ? $Row[39] : '';
+         $Ticket{TicketRFreeText7} = defined($Row[40]) ? $Row[40] : '';
+         $Ticket{TicketRFreeText8} = defined($Row[41]) ? $Row[41] : '';
+         $Ticket{TicketRFreeText2} = defined($Row[35]) ? $Row[35] : '';
+         $Ticket{TicketRFreeText3} = defined($Row[36]) ? $Row[36] : '';
+         $Ticket{TicketRFreeText4} = defined($Row[37]) ? $Row[37] : '';
+         $Ticket{TicketRFreeText5} = defined($Row[38]) ? $Row[38] : '';
+         $Ticket{TicketRFreeText6} = defined($Row[39]) ? $Row[39] : '';
+         $Ticket{TicketRFreeText7} = defined($Row[40]) ? $Row[40] : '';
+         $Ticket{TicketRFreeText8} = defined($Row[41]) ? $Row[41] : '';
      }
      # check ticket
      if (!$Ticket{TicketID}) {
***************
*** 937,942 ****
--- 955,1007 ----
      return $Self->{ConfigObject}->Get($Param{Type});
  }
  
+ =item TicketRFreeTextGet()
+ 
+ get possible ticket free text options
+ 
+   my $string = $TicketObject->TicketRFreeTextGet(
+      Type => 'TicketRFreeText3',
+      TicketID => 123,
+      UserID => 123,
+   );
+ 
+   my $string = $TicketObject->TicketRFreeTextGet(
+      Type => 'TicketRFreeText3',
+      UserID => 123,
+   );
+ 
+ =cut
+ 
+ sub TicketRFreeTextGet {
+     my $Self = shift;
+     my %Param = @_;
+     my $Value = $Param{Value} || '';
+     my $Key = $Param{Key} || '';
+     # check needed stuff
+     foreach (qw(UserID Type)) {
+       if (!$Param{$_}) {
+         $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
+         return;
+       }
+     }
+     my %Data = ();
+ #    if (ref($Self->{ConfigObject}->Get($Param{Type})) eq 'HASH') {
+ #        %Data = %{$Self->{ConfigObject}->Get($Param{Type})};
+ #    }
+     # workflow
+     if ($Self->TicketAcl(
+         %Param,
+         ReturnType => 'Ticket',
+         ReturnSubType => $Param{Type},
+         Data => \%Data,
+     )) {
+         my %Hash = $Self->TicketAclData();
+         return \%Hash;
+     }
+     # /workflow
+     return $Self->{ConfigObject}->Get($Param{Type});
+ }
+ 
  =item TicketFreeTextSet()
  
  Set ticket free text.
***************
*** 995,1000 ****
--- 1060,1125 ----
      }
  }
  
+ 
+ =item TicketRFreeTextSet()
+ 
+ Set ticket rfree text.
+ 
+   $TicketObject->TicketRFreeTextSet(
+       Counter => 1,
+       Value => 'Sun',
+       TicketID => 123,
+       UserID => 23,
+   );
+ 
+ =cut
+ 
+ sub TicketRFreeTextSet {
+     my $Self = shift;
+     my %Param = @_;
+     my $Value = defined($Param{Value}) ? $Param{Value} : '';
+ #    my $Key = defined($Param{Key}) ? $Param{Key} : '';
+     # check needed stuff
+     foreach (qw(TicketID UserID Counter)) {
+       if (!$Param{$_}) {
+         $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
+         return;
+       }
+     }
+     # check if update is needed
+     my %Ticket = $Self->TicketGet(TicketID => $Param{TicketID});
+     if ($Value eq $Ticket{"TicketRFreeText$Param{Counter}"})
+         # && $Key eq $Ticket{"TicketFreeKey$Param{Counter}"}) 
+ 	{
+         return 1;
+     }
+     # db quote
+     my $DBValue = $Self->{DBObject}->Quote($Value);
+ #    my $DBKey = $Self->{DBObject}->Quote($Key);
+     # db update
+     my $SQL = "UPDATE ticket SET " . 
+ #   " freekey$Param{Counter} = '$DBKey', " .
+     " rfreetext$Param{Counter} = '$DBValue', " .
+     " change_time = current_timestamp, change_by = $Param{UserID} " .
+     " WHERE id = $Param{TicketID}";
+     if ($Self->{DBObject}->Do(SQL => $SQL)) {
+         # history insert
+         $Self->HistoryAdd(
+             TicketID => $Param{TicketID},
+             QueueID => $Ticket{QueueID},
+             HistoryType => 'TicketFreeTextUpdate',
+             Name => "\%\%FreeRText$Param{Counter}\%\%$Value",
+             CreateUserID => $Param{UserID},
+         );
+         # clear ticket cache
+         $Self->{'Cache::GetTicket'.$Param{TicketID}} = 0;
+         return 1;
+     }
+     else {
+         return;
+     }
+ }
+ 
  =item TicketSetAnswered()
  
  Set if ticket is answered.
***************
*** 1880,1885 ****
--- 2005,2016 ----
              }
          }
      }
+     foreach (1..8) {
+         if ($Param{"TicketRFreeText$_"}) {
+             $Param{"TicketFreeText$_"} =~ s/\*/%/gi;
+             $SQLExt .= " AND st.freetext$_ LIKE '".$Self->{DBObject}->Quote($Param{"TicketFreeText$_"})."'";
+         }
+     }
      # get tickets older then x minutes
      if ($Param{TicketCreateTimeOlderMinutes}) {
          my $Time = $Self->{TimeObject}->SystemTime()-($Param{TicketCreateTimeOlderMinutes}*60);
diff -rch otrs.clean/scripts/database/otrs-schema.mysql.sql otrs.new/scripts/database/otrs-schema.mysql.sql
*** otrs.clean/scripts/database/otrs-schema.mysql.sql	2004-08-17 13:03:30.000000000 -0700
--- otrs.new/scripts/database/otrs-schema.mysql.sql	2005-03-15 15:21:00.000000000 -0800
***************
*** 379,384 ****
--- 379,392 ----
      freetext7 VARCHAR (150),
      freekey8 VARCHAR (80),
      freetext8 VARCHAR (150),
+     rfreetext1 VARCHAR (150),
+     rfreetext2 VARCHAR (150),
+     rfreetext3 VARCHAR (150),
+     rfreetext4 VARCHAR (150),
+     rfreetext5 VARCHAR (150),
+     rfreetext6 VARCHAR (150),
+     rfreetext7 VARCHAR (150),
+     rfreetext8 VARCHAR (150),
      valid_id SMALLINT NOT NULL,
      create_time_unix INTEGER NOT NULL,
      create_time DATETIME NOT NULL,


-----Original Message-----
From: dev-bounces at otrs.org on behalf of Jason Dixon
Sent: Fri 3/18/2005 7:08 AM
To: Development community of OTRS
Subject: Re: [dev] really free text fields
 
On Fri, 18 Mar 2005, Martin Edenhofer wrote:

> Steve Churchill wrote:
> > I'm looking at using the FreeTextFields here, but these seem to only be
> > available as associative hash arrays.  While I find this useful, and
> > like the combo box functionality, I'd still just like some extra "free
> > text" fields associated with each ticket.  Each of these will need to be
> > new fields in the ticket table of course.  I'll try and develop this so
> > adding more fields is a matter of changing your for loop count.

If I can interject, changing the free-text field count is entirely the
wrong way of handling this.  It results in the same problem as hard-coded
attachment counts, etc.  There should really be a new table for
"free_text_types" that allow admins/agents to create new field
definitions.  Each row in the table would define a type that would be
referenced in another table, "free_text(s)".  Each row in this table would
be a unique free_text that would refer back to the ticket_id for the
ticket it's associated with, and have a foreign key back to the
free_text_types table.  Not only does this scale by just looping through
the array of $sth->fetchrow_hashref(s), but new free_text entries can
based on existing "types" by referencing back to the free_text_types table
and forming the basis for a drop-down.

Does my rambling make any sense?  :)

-- 
Jason Dixon                             301.286.8635 voice
NASA / Goddard Space Flight Center      jason at nccs.nasa.gov
AMTI, Inc.                              Building 28, Room S212
Code 931
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 15338 bytes
Desc: not available
Url : http://lists.otrs.org/pipermail/dev/attachments/20050321/b7e882ea/attachment-0001.bin


More information about the dev mailing list