Custom Ticket Creation Form

I’ve created a custom form for ticket creation in a specific queue. I wanted some specific information to be displayed and some related instructions, that sort of thing. What I’d like is to make a link indicating “Description of Choices” which pops up a window displaying all of the clicked Custom Field’s values and the description text of each possible value. Could anyone help?

I have not reinvented the wheel entirely, I used the original index.html and simply renamed it and put the modified version in the local directory tree, as well as modified versions of the EditCustomField and EditCustomFields elements. Then I added a new section in the main menu sidebar to access it. So all of the RT modules are available to my new form, I’m just not sure how to do it.

John Schubert gave me a suggestion to use the alt= param, but that doesn’t work well for me.

I’ve added the following lines to the EditCustomFields element file:

     <script language="JavaScript" type="text/JavaScript">
     <!--                                                
       function MM_openBrWindow(theURL,winName,features) { //v2.0
               window.open(theURL,winName,features);            
                }                                  
      //-->     
      </script>

     [ <a href="#" onClick="MM_openBrWindow('Systems-Descriptions.html','test','width=  300,height=300')">Description of Choices</a> ]<br />

Problem is, I’m not sure how to pass the current queue and such to that page.

This doesn’t even come close to working:

Systems-Descriptions.html:

% print “:::”, %ARGS, “:::\n”;


     <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "

%# print Dumper( $CustomField->Values() );
% my $CustomFieldValues = $CustomField->Values();
% while ( my $value = $CustomFieldValues->Next ) {
% #print Dumper( $value->values->description );
% print $value->{‘values’}->{‘description’},"\n" ;
% }
">
%#



%
<%INIT>
my $QueueObj = new RT::Queue($session{‘CurrentUser’});
$QueueObj->Load($Queue) || Abort(loc(“Queue could not be loaded.”));
my $CustomField = $QueueObj->CustomFields();
</%INIT>

<%ARGS>
$DependsOn => undef
$DependedOnBy => undef
$MemberOf => undef
$QuoteTransaction => undef
$Queue => 35
</%ARGS>

This yields:

error: Can’t locate object method “Values” via package “RT::CustomFields” at /usr/local/rt3/local/html/Systems-Descriptions.html line 7.

context:

3:


	
4:
5: <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "
6: %# print Dumper( $CustomField->Values() );
7: % my $CustomFieldValues = $CustomField->Values();
8: % while ( my $value = $CustomFieldValues->Next ) {
9: % #print Dumper( $value->values->description );
10: % print $value->{‘values’}->{‘description’},"\n" ;
11: % }

code stack: /usr/local/rt3/local/html/Systems-Descriptions.html:7
/usr/local/rt3/share/html/autohandler:182

Andy Harrison
Great Works Internet
System Operations
(full headers for details)

Hello,

After many attempts at trial and error and after a moderate

amount of web research, including downloading and searching all of the
mailinglists, I feel compelled to ask this question of the
mailinglist.

I am trying to create a custom ticket creation form, by

forking Create.html. I do not want Custom Fields, just to add the
extra INPUTs to the Content input that becomes the first comment.

As I don't know the "sequence diagrams" for RT, I have been

unable to find a way to make this change (theoretically impossible)
within the Create.html file, nor find where the Ticket is being
created (and the form processed), and thus make the change there.

I am not sure that this is even the correct mechanism for

making a custom form of this type. I did read through the “RT
Essentials” but did not really see a way to do this.

All I really need is someone to acknowledge which bearing the

solution lies on. For instance, can I simply create a Scrip that
takes care of the post processing and test on the existence of the
extra INPUTs?

Any assistance would be very appreciated.

Sincerely,
Andrew Dougherty

Here are the extra INPUTs

<!-- BEGIN NONSENSE -->

% foreach my $field ("Username","Unit","Phone Number") {
<TR>
<TD class=label>
<&|/l&><%$field%></&>:
</TD>
<TD class=value COLSPAN=5>
<INPUT Name="<%$field%>" SIZE=15 MAXSIZE=100 

value="<%$ARGS{$field} || ‘’%>">



% }

<TR>
<TD class=label>
<&|/l&>Issue Type</&>:
</TD>
<TD class=value>
<SELECT NAME="Issue Type">
% foreach my $problem ("Speed Problems","VOIP 

Problems",“Connectivity”,“Service Outage”,“Other”) {
<OPTION “<%$problem%>”><%$problem%>
% }


<TR>
<TD class=label>
<&|/l&>Severity</&>:
</TD>
<TD class=value>
<SELECT NAME="Severity">
% foreach my $severity (1..5) {
<OPTION "<%$severity%>"><%$severity%>
% }
</SELECT>
</TD>
</TR>

<TR>
<TD class=label>
<&|/l&>Building</&>:
</TD>
<TD class=value>
<SELECT NAME="Building">
% foreach my $building ("blah","blah","blah") {
<OPTION "<%$building%>"><%$building%>
% }
</SELECT>
</TD>
</TR>

<!-- END NONSENSE -->

I then wish to have all the values for the INPUTs added into the value
for the Content.

i.e. theoretically:

$ARGS{Content} = join("\n",map "$_: $ARGS{$_}",
	("Username","Unit","Phone Number","Issue Type",
	"Severity","Building","Content"))."\n\n\n";

Andrew Dougherty
Network Operations and Security Engineer
onShore Networks, LLC
(312)850-5200 ext. 146

All I really need is someone to acknowledge which bearing the
solution lies on. For instance, can I simply create a Scrip that
takes care of the post processing and test on the existence of the
extra INPUTs?

So, this may be more simplistic then what you are searching for but I
beleive it fits your requirements (and is what I did to acheive the same
thing).

I just created a web form that ensured all the fields I wanted were
correctly filled out and once it was the user could submit the form-

From there, I just used the rt mail gatway to create the ticket with all
the information going into the content of the field. Apologies if
mis-read the requirements.

Paul

Hi Andrew,
Rather than trying to modify RT itself, we just built an external web
form that collected the data and crunched it all into custom headers
attached to an e-mail message sent to RT; we then used an onCreate scrip
in RT to handle the incoming messages, parse out the useful information,
and modify the ticket as it was being created. We used custom fields to
store the data, but you wouldn’t have to. By using the external form, we
avoided having to deal with merging custom code in RT with new releases
any time we wanted to upgrade. Hope that’s helpful.

Cheers,
Jeff Albert

Andrew Dougherty wrote:

Great, thanks to both of you, I will use this approach, it’s consistent
with my current one and I see the path.

Thanks!

Andrew Dougherty
Network Operations and Security Engineer
onShore Networks, LLC
(312)850-5200 ext. 146On Fri, 6 Oct 2006, Jeff Albert wrote:

Hi Andrew,
Rather than trying to modify RT itself, we just built an external web form
that collected the data and crunched it all into custom headers attached to
an e-mail message sent to RT; we then used an onCreate scrip in RT to handle
the incoming messages, parse out the useful information, and modify the
ticket as it was being created. We used custom fields to store the data, but
you wouldn’t have to. By using the external form, we avoided having to deal
with merging custom code in RT with new releases any time we wanted to
upgrade. Hope that’s helpful.

Cheers,
Jeff Albert

Andrew Dougherty wrote:

Hello,

After many attempts at trial and error and after a moderate

amount of web research, including downloading and searching all of the
mailinglists, I feel compelled to ask this question of the
mailinglist.

I am trying to create a custom ticket creation form, by

forking Create.html. I do not want Custom Fields, just to add the
extra INPUTs to the Content input that becomes the first comment.

As I don't know the "sequence diagrams" for RT, I have been

unable to find a way to make this change (theoretically impossible)
within the Create.html file, nor find where the Ticket is being
created (and the form processed), and thus make the change there.

I am not sure that this is even the correct mechanism for

making a custom form of this type. I did read through the “RT
Essentials” but did not really see a way to do this.

All I really need is someone to acknowledge which bearing the

solution lies on. For instance, can I simply create a Scrip that
takes care of the post processing and test on the existence of the
extra INPUTs?

Any assistance would be very appreciated.

Sincerely,
Andrew Dougherty

Here are the extra INPUTs

<!-- BEGIN NONSENSE -->

% foreach my $field ("Username","Unit","Phone Number") {
<TR>
<TD class=label>
<&|/l&><%$field%></&>:
</TD>
<TD class=value COLSPAN=5>
<INPUT Name="<%$field%>" SIZE=15 MAXSIZE=100 value="<%$ARGS{$field} || 

‘’%>">



% }

<TR>
<TD class=label>
<&|/l&>Issue Type</&>:
</TD>
<TD class=value>
<SELECT NAME="Issue Type">
% foreach my $problem ("Speed Problems","VOIP 

Problems",“Connectivity”,“Service Outage”,“Other”) {
<OPTION “<%$problem%>”><%$problem%>
% }


<TR>
<TD class=label>
<&|/l&>Severity</&>:
</TD>
<TD class=value>
<SELECT NAME="Severity">
% foreach my $severity (1..5) {
<OPTION "<%$severity%>"><%$severity%>
% }
</SELECT>
</TD>
</TR>

<TR>
<TD class=label>
<&|/l&>Building</&>:
</TD>
<TD class=value>
<SELECT NAME="Building">
% foreach my $building ("blah","blah","blah") {
<OPTION "<%$building%>"><%$building%>
% }
</SELECT>
</TD>
</TR>

<!-- END NONSENSE -->

I then wish to have all the values for the INPUTs added into the value
for the Content.

i.e. theoretically:

$ARGS{Content} = join("\n",map "$_: $ARGS{$_}",
    ("Username","Unit","Phone Number","Issue Type",
    "Severity","Building","Content"))."\n\n\n";

Andrew Dougherty
Network Operations and Security Engineer
onShore Networks, LLC
(312)850-5200 ext. 146


List info: The rt-devel Archives

I’ve created a custom form for ticket creation in a specific queue. I wanted some specific information to be displayed and some related instructions, that sort of thing. What I’d like is to make a link indicating “Description of Choices” which pops up a window displaying all of the clicked Custom Field’s values and the description text of each possible value. Could anyone help?

I have not reinvented the wheel entirely, I used the original index.html and simply renamed it and put the modified version in the local directory tree, as well as modified versions of the EditCustomField and EditCustomFields elements. Then I added a new section in the main menu sidebar to access it. So all of the RT modules are available to my new form, I’m just not sure how to do it.

Andy Harrison
Great Works Internet
System Operations
(full headers for details)

a link indicating “Description of Choices” which pops up a window displaying all of the clicked Custom Field’s values and the description text of each possible value. Could anyone help?

Just as a thought to save a whole slew of links, how about using the
"alt" tags for an ? image. Meaning, put a GIF or JPG with a question
mark, and using alt tags for the <img src tag put the descriptions
there for mouse-over. The page may take a second or two longer to load,
but saves mouseclicks.

John

I’ve created a custom form for ticket creation in a specific queue. I wanted some specific information to be displayed and some related instructions, that sort of thing. What I’d like is to make a link indicating “Description of Choices” which pops up a window displaying all of the clicked Custom Field’s values and the description text of each possible value. Could anyone help?

I have not reinvented the wheel entirely, I used the original index.html and simply renamed it and put the modified version in the local directory tree, as well as modified versions of the EditCustomField and EditCustomFields elements. Then I added a new section in the main menu sidebar to access it. So all of the RT modules are available to my new form, I’m just not sure how to do it.

John Schubert gave me a suggestion to use the alt= param, but that doesn’t work well for me.

I’ve added the following lines to the EditCustomFields element file:

    <script language="JavaScript" type="text/JavaScript">
    <!--                                                
      function MM_openBrWindow(theURL,winName,features) { //v2.0
              window.open(theURL,winName,features);            
               }                                  
     //-->     
     </script>

    [ <a href="#" onClick="MM_openBrWindow('Systems-Descriptions.html','test','width=  300,height=300')">Description of Choices</a> ]<br />

Problem is, I’m not sure how to pass the current queue and such to that page.

This doesn’t even come close to working:

Systems-Descriptions.html:

% print “:::”, %ARGS, “:::\n”;


    <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "

%# print Dumper( $CustomField->Values() );
% my $CustomFieldValues = $CustomField->Values();
% while ( my $value = $CustomFieldValues->Next ) {
% #print Dumper( $value->values->description );
% print $value->{‘values’}->{‘description’},"\n" ;
% }
">
%#



%
<%INIT>
my $QueueObj = new RT::Queue($session{‘CurrentUser’});
$QueueObj->Load($Queue) || Abort(loc(“Queue could not be loaded.”));
my $CustomField = $QueueObj->CustomFields();
</%INIT>

<%ARGS>
$DependsOn => undef
$DependedOnBy => undef
$MemberOf => undef
$QuoteTransaction => undef
$Queue => 35
</%ARGS>

This yields:

error: Can’t locate object method “Values” via package “RT::CustomFields” at /usr/local/rt3/local/html/Systems-Descriptions.html line 7.

context:

3:


	
4:
5: <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "
6: %# print Dumper( $CustomField->Values() );
7: % my $CustomFieldValues = $CustomField->Values();
8: % while ( my $value = $CustomFieldValues->Next ) {
9: % #print Dumper( $value->values->description );
10: % print $value->{‘values’}->{‘description’},"\n" ;
11: % }

code stack: /usr/local/rt3/local/html/Systems-Descriptions.html:7
/usr/local/rt3/share/html/autohandler:182

Andy Harrison
(full headers for details)

Andy Harrison
Great Works Internet
System Operations
(full headers for details)

I’ve created a custom form for ticket creation in a specific queue. I wanted some specific information to be displayed and some related instructions, that sort of thing. What I’d like is to make a link indicating “Description of Choices” which pops up a window displaying all of the clicked Custom Field’s values and the description text of each possible value. Could anyone help?

I have not reinvented the wheel entirely, I used the original index.html and simply renamed it and put the modified version in the local directory tree, as well as modified versions of the EditCustomField and EditCustomFields elements. Then I added a new section in the main menu sidebar to access it. So all of the RT modules are available to my new form, I’m just not sure how to do it.

John Schubert gave me a suggestion to use the alt= param, but that doesn’t work well for me.

I’ve added the following lines to the EditCustomFields element file:

     <script language="JavaScript" type="text/JavaScript">
     <!--                                                
       function MM_openBrWindow(theURL,winName,features) { //v2.0
               window.open(theURL,winName,features);            
                }                                  
      //-->     
      </script>

     [ <a href="#" onClick="MM_openBrWindow('Systems-Descriptions.html','test','width=  300,height=300')">Description of Choices</a> ]<br />

Problem is, I’m not sure how to pass the current queue and such to that page.

This doesn’t even come close to working:

Systems-Descriptions.html:

% print “:::”, %ARGS, “:::\n”;


     <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "

%# print Dumper( $CustomField->Values() );
% my $CustomFieldValues = $CustomField->Values();
% while ( my $value = $CustomFieldValues->Next ) {
% #print Dumper( $value->values->description );
% print $value->{‘values’}->{‘description’},"\n" ;
% }
">
%#



%
<%INIT>
my $QueueObj = new RT::Queue($session{‘CurrentUser’});
$QueueObj->Load($Queue) || Abort(loc(“Queue could not be loaded.”));
my $CustomField = $QueueObj->CustomFields();
</%INIT>

<%ARGS>
$DependsOn => undef
$DependedOnBy => undef
$MemberOf => undef
$QuoteTransaction => undef
$Queue => 35
</%ARGS>

This yields:

error: Can’t locate object method “Values” via package “RT::CustomFields” at /usr/local/rt3/local/html/Systems-Descriptions.html line 7.

context:

3:


	
4:
5: <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "
6: %# print Dumper( $CustomField->Values() );
7: % my $CustomFieldValues = $CustomField->Values();
8: % while ( my $value = $CustomFieldValues->Next ) {
9: % #print Dumper( $value->values->description );
10: % print $value->{‘values’}->{‘description’},"\n" ;
11: % }

code stack: /usr/local/rt3/local/html/Systems-Descriptions.html:7
/usr/local/rt3/share/html/autohandler:182

Andy Harrison
(full headers for details)

Andy Harrison wrote:
[snip]

Problem is, I’m not sure how to pass the current queue and such to that page.

This doesn’t even come close to working:

Systems-Descriptions.html:

% print “:::”, %ARGS, “:::\n”;


     <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "

%# print Dumper( $CustomField->Values() );
% my $CustomFieldValues = $CustomField->Values();
% while ( my $value = $CustomFieldValues->Next ) {
% #print Dumper( $value->values->description );
% print $value->{‘values’}->{‘description’},“\n” ;
% }
">
%#



%
<%INIT>
my $QueueObj = new RT::Queue($session{‘CurrentUser’});
$QueueObj->Load($Queue) || Abort(loc(“Queue could not be loaded.”));
my $CustomField = $QueueObj->CustomFields();
</%INIT>

<%ARGS>
$DependsOn => undef
$DependedOnBy => undef
$MemberOf => undef
$QuoteTransaction => undef
$Queue => 35
</%ARGS>

This yields:

error: Can’t locate object method “Values” via package “RT::CustomFields” at /usr/local/rt3/local/html/Systems-Descriptions.html line 7.

context:

3:


	
4:
5: <img src=“<%$RT::WebImagesURL%>/gwi.jpg” alt= "
6: %# print Dumper( $CustomField->Values() );
7: % my $CustomFieldValues = $CustomField->Values();
8: % while ( my $value = $CustomFieldValues->Next ) {
9: % #print Dumper( $value->values->description );
10: % print $value->{‘values’}->{‘description’},“\n” ;
11: % }

code stack: /usr/local/rt3/local/html/Systems-Descriptions.html:7
/usr/local/rt3/share/html/autohandler:182

	Hello.

First of all, people don’t like read huge texts on MLs.
For API docs use something like this:
perldoc /www/rt3/lib/RT/CustomField_Overlay.pm

Watch errors more careful.
There is realy no method ‘Values’ in ‘RT::CustomFields’, but it’s in
‘RT::CustomField’.

A little about RT API:

  1. _Overlay.pm, _Vendor.pm and _Local.pm it’s includes in ().pm with
    same namespace as (
    ).pm. This files contains extension and override
    funcs and includes at (
    ).pm loadtime. Order of including could be found
    at the end of (*).pm I skip them below, this modules don’t have own
    namespace.

  2. RT<->DB interactions based on DBIx::SearchBuilder.
    RT::Handle - ISA DBIx::SearchBuilder::Handle::YourDBType;
    RT::SearchBuilder - ISA DBIx::SearchBuilder, RT::Base;
    RT::Record - ISA RT::Base, DBIx::SearchBuilder::Record;

  3. RT::Base - is superclass that provide CurrentUser, loc methods for
    children.

  4. Table - it’s collection of records. So there pairs of classes for
    each table with some exceptions as usually:

ACE.pm ACL.pm
Attachment.pm Attachments.pm
CachedGroupMember.pm CachedGroupMembers.pm
CustomField.pm CustomFields.pm
CustomFieldValue.pm CustomFieldValues.pm
GroupMember.pm GroupMembers.pm
Group.pm Groups.pm
Link.pm Links.pm
Principal.pm Principals.pm
Queue.pm Queues.pm
ScripAction.pm ScripActions.pm
ScripCondition.pm ScripConditions.pm
Scrip.pm Scrips.pm
Template.pm Templates.pm
TicketCustomFieldValue.pm TicketCustomFieldValues.pm
Ticket.pm Tickets.pm
Transaction.pm Transactions.pm
User.pm Users.pm

Left column ISA RT:Record, right ISA RT::SearchBuilder subclasses.
Right are collections of left. So you can Limit* them, Count and
move(First, Next, Prev, Last) through them. Allmost all functions
derived from DBIx::SearchBuilder except Limit* and some other, they are
defined in *_Overlay.pm

When you move through collection, functions return Record instance
inherited from RT::Record which represents row in table.
Table fields could be accessed in to ways:

  1. $record->FieldName - get value of ‘FieldName’
  2. $record->SetFieldName - set value of ‘FieldName’
    This was achieved with perl AUTOLOAD mechanism.
    This classes also often have different Load* funcs, it’s useful when you
    want to Load particular row in instance by some parametr(field, eg Name)

Tables can have relationships with other tables, for such cases classes
derived from RT::Record has special methods which return another RT::*
instances, eg:
RT::Ticket has method OwnerObj(defined in RT/Ticket_Overlay.pm) that
return new RT::User instance already Loaded with Ticket’s owner, but
Transactions sub returns collection.

  1. There is also ‘exception’ classes in RT:
    URI.pm
    System.pm
    Date.pm
    CurrentUser.pm

     I hope this help you a little. Ruslan.
    
  I hope this help you a little. Ruslan.

Sorry, it doesn’t. I still don’t understand how to pass the current queue and CustomField to a page that I’ve created. I looked through a variety of the module files with perldoc, I but don’t see anything that helps me.

Andy Harrison
Great Works Internet
System Operations
(full headers for details)

Andy Harrison wrote:

I’ve created a custom form for ticket creation in a specific queue. I wanted some specific information to be displayed and some related instructions, that sort of thing. What I’d like is to make a link indicating “Description of Choices” which pops up a window displaying all of the clicked Custom Field’s values and the description text of each possible value. Could anyone help?

I have not reinvented the wheel entirely, I used the original index.html and simply renamed it and put the modified version in the local directory tree, as well as modified versions of the EditCustomField and EditCustomFields elements. Then I added a new section in the main menu sidebar to access it. So all of the RT modules are available to my new form, I’m just not sure how to do it.

John Schubert gave me a suggestion to use the alt= param, but that doesn’t work well for me.

I’ve added the following lines to the EditCustomFields element file:

     <script language="JavaScript" type="text/JavaScript">
     <!--                                                
       function MM_openBrWindow(theURL,winName,features) { //v2.0
               window.open(theURL,winName,features);            
                }                                  
      //-->     
      </script>

     [ <a href="#" onClick="MM_openBrWindow('Systems-Descriptions.html','test','width=  300,height=300')">Description of Choices</a> ]<br />

You can send arguments to your script ‘Systems-Descriptions.html’ with
http GET method:

Description of Choices

Problem is, I’m not sure how to pass the current queue and such to that page.

This doesn’t even come close to working:

Systems-Descriptions.html:

% print “:::”, %ARGS, “:::\n”;


     <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "

%# print Dumper( $CustomField->Values() );
% my $CustomFieldValues = $CustomField->Values();
% while ( my $value = $CustomFieldValues->Next ) {
% #print Dumper( $value->values->description );
% print $value->{‘values’}->{‘description’},"\n" ;
This is rude hack and is not using of RT API. You are accessing class
private data member which not described in public API.
% }
">
%#



%
<%INIT>
my $QueueObj = new RT::Queue($session{‘CurrentUser’});
$QueueObj->Load($Queue) || Abort(loc(“Queue could not be loaded.”));
my $CustomField = $QueueObj->CustomFields();
$QueueObj->CustomFields(); return collection of CustomField instances
not one CustomField.

Try next code:
% my $CFs = $QueueObj->CustomFields();
% while (my $CF = $CFs->Next) {
% my $CFVs = $CF->Values();

CustomField: <% $CF->Name %>(<% $CF->Type %>)


Description: <% $CF->Description %>


Values:


% while ( my $CFV = $CFVs->Next ) {
      Value: <% $CFV->Name %>


      Descr: <% $CFV->Description %>


% }
% }

</%INIT>

<%ARGS>
$DependsOn => undef
$DependedOnBy => undef
$MemberOf => undef
$QuoteTransaction => undef
You don’t need this ARGS.
$Queue => 35
You need only this ARG.
This(ARGS) section is described in Mason doc and allow magicaly bind
request arguments to perl variables.
So now you can use $Queue or $ARGS{‘Queue’} in your code. And pass them
via URI: …/xxx.html?Queue=20
</%ARGS>

This yields:

error: Can’t locate object method “Values” via package “RT::CustomFields” at /usr/local/rt3/local/html/Systems-Descriptions.html line 7.
RT::CustomFields class realy don’t have method Values.

Andy Harrison wrote:

     [ <a href="#" 

onClick=“MM_openBrWindow(‘Systems-Descriptions.html’,‘test’,‘width=
300,height=300’)”>Description of Choices ]

You can send arguments to your script ‘Systems-Descriptions.html’ with
Ok, I changed it to this:

[ Description of Choices ]

Try next code:
% my $CFs = $QueueObj->CustomFields();
<---- snip, your sample code ----->

Using your example code I’m almost there. My only problem is that in the new page that I open up, the $CFV-Description is printed for every single CustomField in this queue. Here is the code that almost works.

Systems-Description.html:
%
% # Added the $ARGS{‘CustomField’} to see if it would just print from
% # the clicked CustomField
% my $CFs = $QueueObj->CustomFields($ARGS{‘CustomField’});
% print $Queue, “\n”;

% while (my $CF = $CFs->Next) { % my $CFVs = $CF->Values(); % % # This prints the correct Argument matching the customfield I % # clicked % while ( my $CFV = $CFVs->Next ) { % } % }
ARG <%$ARGS{'CustomField'}%>
Name: <% $CFV->Name %>
Description: <% $CFV->Description %>

<%INIT>
my $QueueObj = new RT::Queue($session{‘CurrentUser’});
$QueueObj->Load($Queue) || Abort (loc(“Queue could not be loaded.”));
</%INIT>

<%ARGS>
$Queue => 35
$CF => undef
$CFV => undef
</%ARGS>

Andy Harrison
(full headers for details)

My only problem is that in the new page that I open up, the $CFV-Description is printed for every single CustomField in this queue. Here is the code that almost works.

Nevermind, I threw this in the loop and I’m all set:

% next unless $CFV->CustomField == $ARGS{‘CustomField’};

Thanx for the helping hand, I needed it!

Andy Harrison
(full headers for details)

Don’t forget that if you are comparing strings it should
be ‘eq’ and not ‘==’. Not sure it applies in this case
but thought I’d mention it.

-ToddOn Tue, Dec 16, 2003 at 02:22:27PM -0500, Andy Harrison wrote:

On Tue, 16 Dec 2003 12:14:57 -0500 Andy Harrison ah3@mlz.us wrote:

My only problem is that in the new page that I open up, the $CFV-Description is printed for every single CustomField in this queue. Here is the code that almost works.

Nevermind, I threw this in the loop and I’m all set:

% next unless $CFV->CustomField == $ARGS{‘CustomField’};

Thanx for the helping hand, I needed it!


Andy Harrison
(full headers for details)


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm