Custom Fields won't show up when viewing RT through MediaWiki

All,
We’re using MediaWiki + RT to allow us to track issues currently
open, issues attributed to a customer’s company, that kind of thing.
However we aren’t able to get Custom Fields to be displayed when we use
them:

 We have only 4 Custom Fields, but none of them are displayed when 

we try to pull them out. Is anyone else having this experience? For
information, we are using the “replace Postgres with MySQL” hack from
this page:

http://www.mediawiki.org/wiki/Extension_talk:RT

 I'm wondering if the MySQL alternative doesn't have the same way of 

pulling the Custom Fields out the same way Postgres does. Thoughts?

N. Scott Pestana
IT Infrastructure
Linguamatics

All,
We’re using MediaWiki + RT to allow us to track issues currently open,
issues attributed to a customer’s company, that kind of thing. However we
aren’t able to get Custom Fields to be displayed when we use them:

We have only 4 Custom Fields, but none of them are displayed when we try
to pull them out. Is anyone else having this experience? For information,
we are using the “replace Postgres with MySQL” hack from this page:

Extension talk:RT - MediaWiki

I’m wondering if the MySQL alternative doesn’t have the same way of
pulling the Custom Fields out the same way Postgres does. Thoughts?

As far as I can see code on the linked page has no any kind of support
of custom fields. Code linked from the primary page does mention
custom fields, but it’s not to display them, but to filter by them.


N. Scott Pestana
IT Infrastructure
Linguamatics

Best regards, Ruslan.

Ruslan,
I was really confused by that too at first. The code on that page
must have been from a different version, the current code (which I
verified we are using) goes like this:

224 // Allow use of custom fields
225 $searchcustom = ‘’;
226 if ( array_key_exists(‘custom’, $args ) ) {
227 $searchcustom = trim( $args[‘custom’] );
228 $cfargs = trim( strtolower(
$args[‘custom’] ) );
229 $ticketquery .= ‘, customfields cf,
objectcustomfieldvalues ov’;
230 $whereclause .= “\nAND ov.objectid =
t.id\nAND ov.customfield=cf.id\nAND ov.disabled = 0”;
231 $whereclause .= “\nAND LOWER(cf.name) IN (”;
232 foreach ( preg_split( ‘/\s*,\s*/’, $cfargs
) as $word ) {
233 $word = trim( $word );
234 if ( !preg_match( ‘/[1]+$/’,
$word ) ) {
235 die ( wfMsg (
‘rt-badcfield’, $word ) );
236 }
237 $whereclause .= “‘$word’,”;
238 $ticketquery = preg_replace(
‘/COALESCE/’, “\nov.content AS custom, COALESCE”, $ticketquery);
239 }
240 $whereclause = preg_replace( ‘/.$/’, ‘)’,
$whereclause );
241 }

 This is in RT_body.php, can be found here:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/RT.git;a=tree

-ScottOn 5/11/2012 4:38 PM, Ruslan Zakirov wrote:

On Fri, May 11, 2012 at 10:44 PM, Scott Pestana scott.pestana@linguamatics.com wrote:

All,
We’re using MediaWiki + RT to allow us to track issues currently open,
issues attributed to a customer’s company, that kind of thing. However we
aren’t able to get Custom Fields to be displayed when we use them:

We have only 4 Custom Fields, but none of them are displayed when we try

to pull them out. Is anyone else having this experience? For information,
we are using the “replace Postgres with MySQL” hack from this page:

Extension talk:RT - MediaWiki

I'm wondering if the MySQL alternative doesn't have the same way of

pulling the Custom Fields out the same way Postgres does. Thoughts?
As far as I can see code on the linked page has no any kind of support
of custom fields. Code linked from the primary page does mention
custom fields, but it’s not to display them, but to filter by them.


N. Scott Pestana
IT Infrastructure
Linguamatics

N. Scott Pestana
IT Infrastructure
Linguamatics


  1. \w .- ↩︎