Elements/CollectionAsTable/ParseFormat

Is there any documentation for the formatting system used by
Elements/CollectionAsTable/ParseFormat?

I’ve got some way to understanding it, but I’m stuck on something seemingly
insane. In html/SelfService/Elements/MyRequests the format is:

qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,
Requestors’,
OwnerName};

I don’t understand the difference between Status and ‘Requestors

I have ascertained that the ‘’ are a red herring here. Requestors and
Requestors behave identically.

OK. As above, those two lines of that format parse to give these values
in the columns array:

$VAR1 = [
Status
];
$VAR1 = [
Requestors’,
’’
];

That produces an HTML table with these headers:

#SubjectStatusRequestorsOwner

If I take out the __ and use the format

qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,
‘Requestors’,
OwnerName};

it gives these values in the columns array:

$VAR1 = [
Status
];
$VAR1 = [
Requestors
];

(note, no ‘’ now)

and this HTML:

#SubjectStatusOwner

Difference is

was:

Requestors
now:

what I don’t understand is what the difference in behaviour is between Status
and Requestors. Because in html/Elements/RT__Ticket/ColumnMap I see

Status => {
    attribute => 'Status',
    value     => sub { return loc($_[0]->Status) }
},

Requestors => {
    attribute => 'Requestor.EmailAddress',
    value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString }
},

Neither specify title. Yet one gets a title for free.

How?

Nicholas Clark

Is there any documentation for the formatting system used by
Elements/CollectionAsTable/ParseFormat?

I’ve got some way to understanding it, but I’m stuck on something seemingly
insane. In html/SelfService/Elements/MyRequests the format is:

Neither specify title. Yet one gets a title for free.

How?

OK. I’m now very confused. I can’t now replicate it.
Which I think means that the following patch is reasonable, just to increase
consistency

Nicholas Clark

Index: html/SelfService/Elements/MyRequests
RCS file: /export/cvsroot/rt-external/html/SelfService/Elements/MyRequests,v
retrieving revision 1.2
diff -p -d -u -r1.2 MyRequests
— html/SelfService/Elements/MyRequests 24 May 2007 15:41:23 -0000 1.2
+++ html/SelfService/Elements/MyRequests 25 May 2007 15:47:30 -0000
@@ -75,7 +75,7 @@ my @Format = qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,

  • Requestors’,
  • Requestors,
    OwnerName};
    </%INIT>
    <%ARGS>

Is there any documentation for the formatting system used by
Elements/CollectionAsTable/ParseFormat?

I’ve got some way to understanding it, but I’m stuck on something
seemingly
insane. In html/SelfService/Elements/MyRequests the format is:

Neither specify title. Yet one gets a title for free.

How?

OK. I’m now very confused. I can’t now replicate it.
Which I think means that the following patch is reasonable, just to
increase
consistency

This patch is reasonable, yes.

PGP.sig (186 Bytes)

Thanks. Applied.On May 25, 2007, at 11:49 AM, Nicholas Clark wrote:

On Fri, May 25, 2007 at 04:09:03PM +0100, Nicholas Clark wrote:

Is there any documentation for the formatting system used by
Elements/CollectionAsTable/ParseFormat?

I’ve got some way to understanding it, but I’m stuck on something
seemingly
insane. In html/SelfService/Elements/MyRequests the format is:

Neither specify title. Yet one gets a title for free.

How?

OK. I’m now very confused. I can’t now replicate it.
Which I think means that the following patch is reasonable, just to
increase
consistency

Nicholas Clark

Index: html/SelfService/Elements/MyRequests

RCS file: /export/cvsroot/rt-external/html/SelfService/Elements/
MyRequests,v
retrieving revision 1.2
diff -p -d -u -r1.2 MyRequests
— html/SelfService/Elements/MyRequests 24 May 2007 15:41:23 -0000
1.2
+++ html/SelfService/Elements/MyRequests 25 May 2007 15:47:30 -0000
@@ -75,7 +75,7 @@ my @Format = qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,

  • Requestors’,
  • Requestors,
    OwnerName};
    </%INIT>
    <%ARGS>

List info: lists.bestpractical.com Mailing Lists
rt-devel

PGP.sig (186 Bytes)