Hide or read-only a specific Custom Field

I have a CF that gets populated by the RT system. How can I hide this one specific field from all users?

It’s actually fine if users see the field and its contents, I just need to prevent them from modifying it.

If I recall correctly, you can grant rights view/edit at the custom field level. This would require you to no longer grant those rights at the queue or global level though

I had the same thought but am not sure how to go about that. So far it looks like I’d need to uncheck “Modify Custom Field Values” for a user group in the queue, then go into every CF and grant access that way. We have a lot of CFs…

Yeah you could write a one-off script that uses the RT Perl API to update the rights if you wanted to go that route!

Ooof that’s just as daunting as manually clicking through every CF in the affected queues. Hasn’t someone out there already written a ‘bulk update CF permissions’ script yet? :slight_smile:

Maybe I’m stuck in my own XY problem here… Ultimately the goal is to prevent the Basics edit screen from overwriting the value in a CustomField that gets updated by The RT System Itself as part of a scrip.

  1. User clicks Basics, changes the Queue, and hits Save
  2. Scrip is triggered because the Queue Change condition is met.
  3. Scrip modifies a CF.
  4. The log shows that after the CF was modified via the scrip by The RT system itself, the CF gets updated again with the value that originally appeared on the Basics edit screen.

Like @knation was saying, if you change the permissions of that specific custom field to not allow anyone to update it, or potentially even view it, it might work.
In my experience, I believe the user has to have rights on both the queue and field level to work with the field. If they have queue rights to update ticket CFs but no rights for that specific CF, they still can’t modify the CF.

Hi @Josh_Tackitt.

If you already use code to solve problems I would not try to solve it with right-management.

Where do you set the value in your Scrip? At custom preparation code or at custom commit code? I can’t remember in detail but I found differences regarding the order the one or the other is executed.

Another idea: The value of CF is a given paramter by modify.html . It should be possible to clear that paramter in the Scrip.

At least it is possible to see old an new values on CF: How to get old and new values from specific CF

Kind regards, Andre.