Request Tracker 5.0.7 – Always Expand "More about requestors"

Hello,

After upgrading from version 4.4.3 to 5.0.7, we noticed that the “More about requestors” section in the ticket detail is no longer expanded by default. In the version 4.4.3, this section was always visible, but now we have to click the arrow (on the right side of the box) to see the user details.

This behavior is inconvenient because it requires manually expanding the section for every ticket, which is time-consuming. Is there a way to ensure that the “More about requestors” section is always expanded?

Thanks for any advice.

Hello,

no one’s solving same problem? It’s quite annoying to have to expand the information every time. Is there really no option in the settings to have it always expanded? Isn’t there some easy way to edit the code to restore the 4.4.3 behavior?

Thank you very much in advance for any answer.

There is a callback in Ticket/Elements/ShowRequestor called AboutThisUser that you might be able to hook into to insert some JQuery to uncollapse the accordian span.

To expand on that, create the directory tree/opt/rt5/local/html/Callbacks/AriaRequestorExpand/Ticket/Elements/ShowRequestor and then in a file called AboutThisUser put:

<script>
  jQuery("#accordion-requestor-<% $requestor->id %>-title").click();
</script>
<%INIT>
</%INIT>
<%ARGS>
$requestor => undef
</%ARGS>

You might need to flush your Mason cache to get this to appear depending on your server config.

I had the same requirement a while back, and some helpful people in the forum pointed me to:

/path/to/rt5/share/html/Ticket/Elements/ShowRequestor

Where around line 76 or so I modified:

    <div id="accordion-requestor-<% $requestor->id %>" class="accordion-content collapse" aria-labelledby="accordion-requestor-<% $requestor->id %>-title">

So that it reads:

    <div id="accordion-requestor-<% $requestor->id %>" class="accordion-content show collapse" aria-labelledby="accordion-requestor-<% $requestor->id %>-title">

Essentially, just adding the “show”.

And I flushed the Mason cache and it’s worked ever since (but, do note that with RT upgrades you’ll have to re-modify the line.

Dejavu, if youre going to hack the file directly (as opposed to a Callback), make a copy in local (same directory structure, just swap share for local), that way upgrading wont affect it

1 Like

You are absolutely correct - and that’s what I was doing with rt4, but, when rt5 came along, there were loads of other changes to the code that I wanted to make sure I was using. Then I got lazy and modified the code myself, rather than persisting with the /local/ variant. Probably the best approach would be to keep a diff handy between the as-shipped and my /local/ variant and just copy the as-shipped to /local/ and apply my diff as a patch with each upgrade.

Good reminder though, mucking about with the default isn’t entirely wise, but since it was effectively a one-word change made infrequently, lazy won.