[rt-users] creating tickets with CF values without ModifyCustomField right

Parish, Brent bparish at cognex.com
Mon Jun 2 16:46:52 EDT 2014


We have this same problem here.
If you don't want to wait for the feature request to be implemented, here is one way around it:

I ended up creating a second set (copy) of the custom fields. 
I named them the same thing, but with an underscore character appended.
(e.g. If the custom field is called "Application" the second/copy custom field would be called "Application_")

Then I gave 'everyone' the right to edit "Application_" but not "Application".
I created a scrip that fires on Ticket Create that looks for all custom fields with the underscore appended and copies them to the custom field of the same name (but without the underscore).  The same scrip also moves the ticket to the appropriate queue.

In this way, the users can now create new tickets and set the initial values of the custom fields.  But once the ticket has been created (thanks to the scrip), it is moved into the proper queue and the users do not have rights to change the custom field values there.

Since this 'general' queue needs to have both sets of custom fields applied to it (so the scrip can copy values from one set to the next), I also had to customize the Self Service screen to hide the custom fields that did not have the underscore appended (otherwise the user get confused seeing two copies of [almost] the exact same field name).  

Just an option that seems to work well for us.  =)

- Brent



-----Original Message-----
From: rt-users [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Emmanuel Lacour
Sent: Monday, June 02, 2014 9:21 AM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] creating tickets with CF values without ModifyCustomField right

On Mon, Jun 02, 2014 at 02:44:14PM +0200, Christian Loos wrote:
> Hi,
> 
> is it possible to create tickets with CF values for users that don't 
> have the ModifyCustomField right?
> Currently if fails with "Permission Denied" in 
> RT::CustomField->AddValueForObject().
> 
> We have some users that use the RT WebUI to create tickets and must 
> enter on ticket create some CF values.
> The same users also have ShowTicket (and ShowQueue) right to get later 
> some informations about the ticket history.
> This users are don't allowed to change CF values later on the tickets, 
> so I can't give them the ModifyCustomField right.
> 
> It is also not obvious that you have to grant users the 
> ModifyCustomField right to be able to create tickets with CF values, 
> as they want to *Create* values and not *Modify* values.
> As there isn't an CreateCustomField(Values) right I think at least for 
> ticket create it would be better if SeeCustomField would be sufficient 
> to create tickets with CF values.
> 

Indeed there is only See/Modify customfield rights (not "set").

That's a known feature request:
http://issues.bestpractical.com/Ticket/Display.html?id=14974

that is still unimplemented  ... a patch may help this feature to be present in a 4.4 release i suppose ;)

-- 
Easter-eggs                              Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37    -   Fax: +33 (0) 1 43 35 00 76
mailto:elacour at easter-eggs.com  -   http://www.easter-eggs.com
--
RT Training - Boston, September 9-10
http://bestpractical.com/training



More information about the rt-users mailing list