<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Everyone!<br>
I have a goal to make RT's Self Service interface a full customer
portal where they can log in to see their outstanding invoices as
well as report trouble by creating a ticket. I imagine adding a
custom field to the users to store an external ID for any user that
I would like to enable this option for. No big deal there. It took a
little time to figure it out but I have added an "Accounting" option
to the top of the page, right after "Tickets" by editing
/opt/rt4/local/html/Elements/Tabs. I then added
/opt/rt4/local/html/SelfService/AccountingARInvoices.html (which I
coped from Closed.html and modified). Here's an Excerpt:<br>
<blockquote><tt><& /SelfService/Elements/ARInvoices,</tt><br>
<tt> %ARGS,</tt><br>
<tt> status => [ RT::Queue->InactiveStatusArray
],</tt><br>
<tt> title => loc('My Open Invoices'),</tt><br>
<tt> BaseURL => RT->Config->Get('WebPath')
."/SelfService/AccountingARInvoices.html?",</tt><br>
<tt> Page => $Page,</tt><br>
<tt>&></tt><br>
</blockquote>
This then calls /opt/rt4/local/html/SelfService/Elements/ARInvoices.
I found that in the call to CollectionList, I can comment out the
Query parameter, and pass Collection instead.<br>
<br>
This is where I seem to have a mental block. I'm not a perl newbie,
but I infrequently code in perl and keep forgetting things I'd once
learned, so it might be obvious to others. However, I am new to the
Mason approach. I'd like to use as many of the built in RT
components as possible to display the data. I have already built an
API that can return a list of open invoices in JSON format, and I
plan to call this API then pass the data as a collection. However,
in testing the approach I tried hard coding the collection parameter
to figure out what this collection needs to look like to work...
such as: Collection => [('a' => '1'), ('b' => '2')]; ...
but I kept getting:<br>
<blockquote><tt>[error]: Odd number of parameters passed to
component expecting name/value pairs</tt><br>
</blockquote>
until I simply passed "()" which led me to see<br>
<blockquote><tt>[error]: Can't call method "CountAll" on unblessed
reference at /opt/rt4/share/html/Elements/CollectionList line 55</tt><br>
</blockquote>
Has anyone else added to the SelfService interface? What format
should the collection be in to work? I tried to modify
/opt/rt4/share/html/Elements/CollectionList to call Data::Dumper so
I could see the format, but for some reason I only saw the currently
logged in user table data, not data about the list of tickets I was
looking at. I'd appreciate any help that can be offered.<br>
<br>
Thank you!<br>
<br>
<br>
<div class="moz-signature">-- <br>
Best regards,
<p style="margin-bottom: 0in;margin-top: 0in"><b>Stephen H.
Switzer</b><br>
</p>
<br>
</div>
</body>
</html>