Custom fields: could they be only editable for administrator only?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom fields: could they be only editable for administrator only?

stephane mainchain
Hi all

We've been using Bugzilla 3.6.1 and I'd like to create custom fields
(like a public description), but only have these fields editable by
adminstrator (don't really want the end user to modify the public
description).
Do you know if and how it is possible?

Thanks for the help!

best regards
--
Stephane Mainchain
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Custom fields: could they be only editable for administrator only?

Tosh, Michael J
stephane mainchain wrote:
> We've been using Bugzilla 3.6.1 and I'd like to create custom fields
> (like a public description), but only have these fields editable by
> adminstrator (don't really want the end user to modify the public
> description).
> Do you know if and how it is possible?

There is a section of the docs that should help you here.
http://www.bugzilla.org/docs/3.6/en/html/cust-change-permissions.html

The second example should be a close enough match to your needs.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom fields: could they be only editable for administrator only?

jfotto2
In reply to this post by stephane mainchain
On Wednesday, March 16, 2011 at 9:03:23 AM UTC-4, Tosh, Michael J wrote:

> stephane mainchain wrote:
> > We've been using Bugzilla 3.6.1 and I'd like to create custom fields
> > (like a public description), but only have these fields editable by
> > adminstrator (don't really want the end user to modify the public
> > description).
> > Do you know if and how it is possible?
>
> There is a section of the docs that should help you here.
> http://www.bugzilla.org/docs/3.6/en/html/cust-change-permissions.html
>
> The second example should be a close enough match to your needs.


Here was my solution to this problem.  I hope other people can benefit from my discovery

   [% FOREACH field = Bugzilla.active_custom_fields %]
     <tr>
       [%# Use PROCESS instead of INCLUDE, because extra_field_item is defined
         # in the template and must be returned back. INCLUDE cannot do that. %]
       [% IF field.name == 'cf_{custom_field_name}' %]
           [% IF user.in_group("admin") %]  
               [% PROCESS bug/field.html.tmpl value = bug.${field.name} editable = 1 %]
           [% ELSE %]
               [% PROCESS bug/field.html.tmpl value = bug.${field.name} editable = 0 %]
           [% END %]
       [% ELSE %]
           [% PROCESS bug/field.html.tmpl value = bug.${field.name} editable = 1 %]
       [% END %]
     </tr>
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Loading...