[rt-users] adding custom field type, how to force single value
Len Jaffe
lenjaffe at jaffesystems.com
Wed Jun 18 15:57:23 EDT 2014
On Wed, Jun 18, 2014 at 3:47 PM, Kevin Falcone <falcone at bestpractical.com>
wrote:
> On Tue, Jun 17, 2014 at 04:08:54PM -0400, Len Jaffe wrote:
> > In order make sure that we're solving the correct problem, since my
> previous
> > post was terse, and I'm not sure whether I used all the right key words,
> please
> > allow me to elaborate:
> >
> > Based on a similar treatment by a colleague, I have created
> local/html/Elements
> > /CustomField_Local.pm
>
> That is not the right place for a Foo_Local.pm, they go in
> local/lib/RT/
>
Indeed. That is where it lives. I misspoke above.
> > The I
> created local/html/Elements/EditCustomFieldJSON_Encoded_Resource_Field
> > and local/html/Elements/ShowCustomFieldJSON_Encoded_Resource_Field
> >
> > Which do what I need them to - pretty print the JSON so a human can read
> it and
> > edit it if necessary.
> >
> > But RT thinks this custom field type allows multiple entries per field,
> and so
> > pukes all over the pretty-printed JSON.
> >
> > When I use a straight "Fill in one text area" RT is ok with the JSON,
> but the
> > JSON is not pretty printed.
>
> In that case, you could use Fill in one text area for editing and just
> override display using the callbacks in ShowCustomField based on the
> CF name.
>
> Otherwise, look into the MaxValues setting.
>
>
How do I associate my new custom field Type "JSON_Encoded_Resource_Field"
with the "Fill in one text area" type. Is that a key value pair in the
CustomField_Local override?
Len.
> -kevin
>
> --
> RT Training - Boston, September 9-10
> http://bestpractical.com/training
>
--
lenjaffe at jaffesystems.com 614-404-4214 @lenjaffe
Information Technology Smoke Jumper, Host of Columbus Code Jam
<http://www.meetup.com/techlifecolumbus/>
www.lenjaffe.com http://www.theycomewithcheese.com
Advent Planet <http://www.lenjaffe.com/AdventPlanet/> - An Aggregation of
Online Advent Calendars.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140618/550f982a/attachment.htm>
More information about the rt-users
mailing list