[rt-users] Can values of Custom Field be based on Queue?

2015-10-26 Thread Chrilly Cheng
Hi All,

I'm trying to find to way to get this requirement work.

We have multiple queues in RT, like queueA, queueB, queueC. All queues are
using the same Custom Field that applied to them. One of those Custom
Fields is called Customer, which is using external values from a REST API.
What we want is in different queue, this Customer filed should shows
different drop-down list for user to select.

Can this be done? It's quite a reasonable requirement. Any thought would be
appreciated, thank you.


BR,
Chrilly


[rt-users] upgrade from 4.0.10 to 4.2.12

2015-10-26 Thread charlyc...@yahoo.com.ar
Hello all,
I finally upgraded my RT from 4.0.10 to 4.2.12 and I'm facing some problems now.
1. When inserting an article in a ticket now I get the HTML code on it, for 
example this:
Dear customer,The change you have requested is not possible.Thank 
you.

If I apply the same article in the 4.0.10 we don't have the HTML code on it.

2. When creating new tickets on the 4.0.10 we could apply different format to 
the text but not possible on the 4.2.12
You can see both screenshots attached.

Thank you all for your help!
Charly






Re: [rt-users] upgrade from 4.0.10 to 4.2.12

2015-10-26 Thread charlyc...@yahoo.com.ar
Hi Matt,
Thank you for your quick response.
Configuration was "Use default (yes)", I tried forcing it to Yes and still the 
same problem.
Thank you,Charly
 


 El Lunes, 26 de octubre, 2015 18:37:02, Matt Zagrabelny 
 escribió:
   

 On Mon, Oct 26, 2015 at 5:24 PM, charlyc...@yahoo.com.ar
 wrote:
> Hello all,
>
> I finally upgraded my RT from 4.0.10 to 4.2.12 and I'm facing some problems
> now.
>
> 1. When inserting an article in a ticket now I get the HTML code on it, for
> example this:
>
> Dear customer,
> The change you have requested is not possible.
> Thank you.
>
> If I apply the same article in the 4.0.10 we don't have the HTML code on it.
>
>
> 2. When creating new tickets on the 4.0.10 we could apply different format
> to the text but not possible on the 4.2.12

In 4.2.12 you are not using a WYSIWYG editor. Try to change to using a
WYSIWYG editor in your settings->preferences.

-m


  

Re: [rt-users] upgrade from 4.0.10 to 4.2.12

2015-10-26 Thread Matt Zagrabelny
On Mon, Oct 26, 2015 at 5:24 PM, charlyc...@yahoo.com.ar
 wrote:
> Hello all,
>
> I finally upgraded my RT from 4.0.10 to 4.2.12 and I'm facing some problems
> now.
>
> 1. When inserting an article in a ticket now I get the HTML code on it, for
> example this:
>
> Dear customer,
> The change you have requested is not possible.
> Thank you.
>
> If I apply the same article in the 4.0.10 we don't have the HTML code on it.
>
>
> 2. When creating new tickets on the 4.0.10 we could apply different format
> to the text but not possible on the 4.2.12

In 4.2.12 you are not using a WYSIWYG editor. Try to change to using a
WYSIWYG editor in your settings->preferences.

-m


Re: [rt-users] Can values of Custom Field be based on Queue?

2015-10-26 Thread Christian Loos
Am 26.10.2015 um 15:18 schrieb Matt Zagrabelny:
> On Mon, Oct 26, 2015 at 2:56 AM, Chrilly Cheng  wrote:
>> Hi All,
>>
>> I'm trying to find to way to get this requirement work.
>>
>> We have multiple queues in RT, like queueA, queueB, queueC. All queues are
>> using the same Custom Field that applied to them. One of those Custom Fields
>> is called Customer, which is using external values from a REST API. What we
>> want is in different queue, this Customer filed should shows different
>> drop-down list for user to select.
>>
>> Can this be done?
> 
> Kind of...
> 
> Have separate CFs each named Customer and apply each to their
> respective queue. Then populate those CFs with the values you'd like.
> 
> We do this with a CF named 'Problem Type'. We put the queue name in
> the Description field of the CF so we can get a sense of what queue
> the CF is applied to when viewing the CF details.
> 
> The CFs won't be global, but they'll each have the same name, so code
> that is queue specific will load the correct Customer CF and thus the
> correct values for the CF.
> 
> The other solutions for this problem involve more JS and AJAXy code.

If you use RT 4.2.10 or later this can easily be done (see [1]).

In you ExternalValues method within your RT::CustomFieldValues::???
package put this:

my $queue  = $self->CustomFieldObject->ContextObject->QueueObj;

to get a RT::Queue object.
You can then return different values based on the Queue id or name.
I would prefer to use the Queue id instead of the Name as the later one
can easily be changed in the WebUI.
If you just want the Queue Id you can put this instead of the above in
your method:

my $queue_id = $self->CustomFieldObject->ContextObject->Queue;

because $self->CustomFieldObject->ContextObject is actually a RT::Ticket
object.


Chris

[1] https://github.com/bestpractical/rt/commit/a84b429