We use Request Tracker as our procurement system, meaning every purchase becomes a ticket. We have reached 84,837 tickets.
We are currently using a slightly older version, but we are testing a new interface based on version 6.0.4.
One of my requirements is to display a PO number on the page. It follows this format: RT84837_Brian, or RT_. Another requirement is to display the end-user and their location as a field, like this: <CF.{Location}> — for example, “Brian Ekman-Gregersen B322”. What is the best way to implement this?
It would be ideal if these two fields could be displayed within the “The Basics” component.
Do you already have these fields, or do you need to add new ones, and if the latter, do you want them to be automatically calculated?
Organising the layout of custom fields on the page is done using %CustomFieldGroupings. That’s in RT_SiteConfig.pm file, or a file in RT_SiteConfig.d folder, or now in UI via /Admin/Tools/EditConfig.html. The details are here: RT Config - RT 6.0.4 Documentation - Best Practical
Hi SimonW,
Thanks for the reply. I am currently using version 3.8.4, but the plan is for this to work in version 6.0.4; I am testing it in version 6.0.3.
I don’t have a “PO no.”, but it is constructed based on the Ticket ID—prefixed with “RT” and followed by an underscore and the <OwnerUsername>:
RT_
The field <CF.{Lokation}> is created in my version 6.0.3, and <RequestorRealName> already exists in the system.
So, it is simply a combination of data we already have.
In my test version (6.0.3), I cannot edit the RT Configuration—I can only view it and see the History.
However, it looks like this:
If I’m understanding what you’re trying to do correctly, I’d be looking for a callback hook in the area you want to display it. Then it should be a little block of Perl code to extract the three or four bits of data from RT (the ticket ID you’ll get, then you just need to pick up the owner name(s) and the Location custom field values) and display it. A callback is handy because when you update RT you don’t have to worry so much about locally modified copies of the RT code.
Are these fields meant to be immutable, that is once a PO number is RT27_Brian it never changes even if the Owner changes from Brian?
You could set those as Custom Fields during the Create Ticket phase with a custom Scrip.
If they are dynamic and just need to be displayed, then a callback might be useful as Jon already said. I’ve not used callbacks yet so can’t say how easily that would be.