[Rt-devel] [Bug] editing CustomField values

Marc Boix mboix at cesca.es
Mon Apr 19 10:10:29 EDT 2004


Hello everybody,

I've found a problem using Custom Field values. Actually, I'm not using
CustomFields added after the installation of RT but I've adapt the
./etc/initialdata file to satisfy our needs (We're using RT 3.0.8, RTIR
1.0.4 and MySQL 4.0.17).

For an Incident's Ticket I've many Customfields and one of them is a
'FreeformMultiple' (id = 98 in the example).
I'm using it to store lists of values as "value1\nvalue2\nvalue3\n..."

When I create an incident, everything works rigth.
I can save my diferent CustomFieldValues and after do it the SQL query looks
like this:

mysql> select id, Ticket, Content from TicketCustomFieldValues where Ticket
=11;
+-----+--------+----------------------------------+
| id  | Ticket | Content                          |
+-----+--------+----------------------------------+
| 101 |     11 | open                             |
|  99 |     11 | something                        |
|  93 |     11 | something                        |
|  92 |     11 | something                        |
|  96 |     11 | something                        |
|  97 |     11 | something                        |
|  94 |     11 | something                        |
|  91 |     11 | something                        |
|  95 |     11 | something                        |
|  98 |     11 | value1
value2
value3
value4
 |
| 100 |     11 | something                        |
+-----+--------+----------------------------------+
11 rows in set (0.01 sec)

Next, I edit this values as:
 - value1 is changed to value1bis
 - value2 is erased
 - value3 is changed to value3bis
 - value4 is kept
so, the list is "value1bis\nvalue3bis\nvalue4\n"

The message showed in RTIR/edit.html page is:
  $1 añadido como un valor de _RTIR_Related_IPs (= #loc(%1 added as a value
for %2))
  $1 añadido como un valor de _RTIR_Related_IPs (= #loc(%1 added as a value
for %2))
  $1 añadido como un valor de _RTIR_Related_IPs (= #loc(%1 added as a value
for %2))
  value1 value2 value3 value4 ha dejado de ser un valor para campo
personalizable _RTIR_Related_IPs
		(= #loc(%1 is no longer a value for custom field %2))
(BTW: why the po file have $1, and not %1, in the spanish translation?)

The result of editing the values is strange. The SQL query returns:

mysql> select id, Ticket, Content from TicketCustomFieldValues where Ticket
=11;
+-----+--------+--------------------+
| id  | Ticket | Content            |
+-----+--------+--------------------+
| 101 |     11 | something          |
|  99 |     11 | something          |
|  93 |     11 | something          |
|  92 |     11 | something          |
|  96 |     11 | something          |
|  97 |     11 | something          |
|  94 |     11 | something          |
|  91 |     11 | something          |
|  95 |     11 | something          |
         |  11 | value1bis
         |  11 | value3bis
            |1 | value4
| 100 |     11 | something          |
+-----+--------+--------------------+
13 rows in set (0.00 sec)

What do you think about?
I'm not enough fluent in Perl and I don't have enough knowledge about RT to
try to make a patch for this problem ;P.

Many thanks,
Marc



More information about the Rt-devel mailing list