Issue with fields displayed in the header of the ticket box

19 views
Skip to first unread message

Nicolas MARTIN

unread,
Jan 22, 2018, 3:07:41 PM1/22/18
to Trac Users
Hello,


Recently, I noticed that the header of the ticket properties box with
the ticket number was not correct: I found the ticket priority in the
'trac-status' span, the ticket resolution in 'trac-type' span and
nothing between the brackets for 'trac-resolution' span whereas the
ticket was closed.
Everything was going on as if an offset was at work somewhere.

At first, I suspected one of our several plugins to be at the root of
this but finally, without further evidence, I fixed it by removing the
first part of tests with 'fields_map' queries in the ticket_box.html
template:

  <h2>
    <a href="${href.ticket(ticket.id)}" class="trac-id">#${ticket.id}</a>
    <span class="trac-status">
      ${'status' in fields_map and fields[fields_map['status']].rendered or ticket.status}
    </span>
    <span class="trac-type" py:if="ticket.type">
      <!--${'type' in fields_map and fields[fields_map['type']].rendered or ticket.type}-->
      ${ticket.type}
    </span
    <span class="trac-resolution" py:if="ticket.resolution">
      <!--(${'resolution' in fields_map and fields[fields_map['resolution']].rendered or ticket.resolution})-->
      (${ticket.resolution})
    </span>
  </h2>

Nothing really serious but I wonder if something is relevant here as it
is the first time I have to fix a template.
We are still on Trac 1.0.1 but I guess nothing has really changed in the
core related to this on the 1.0 development branch.


Regards,
Nicolas

Ryan Ollos

unread,
Jan 22, 2018, 4:06:14 PM1/22/18
to Trac Users
Do you have modified copies of the templates the environment or shared "templates" directory? If so, you'll need to reapply your modifications after every upgrade of your Trac instance, as described here:

Another possibility is that you haven't regenerated static resources after a Trac upgrade:

Do you have a custom site.html?

The other possibility is as you mentioned, that a plugin is causing the issue.

The issue you describe would certainly have been noticed by now if it was a defect with the Trac 1.0.1.

- Ryan 

Nicolas MARTIN

unread,
Jan 23, 2018, 9:08:57 AM1/23/18
to trac-...@googlegroups.com, Ryan Ollos

I found the culprit, HideVals plugin.

The ticket type is one of the filtered fields so probably the plugin messes with 'fields_map' array but I don't know how.
It should only remove the filtered entries within the dropdown menus in the 'Modify' section of the ticket.


Nicolas

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Nicolas MARTIN

unread,
Jan 23, 2018, 11:00:29 AM1/23/18
to trac-...@googlegroups.com, Ryan Ollos

Ok I got it.

After displaying debug output from HideVals, I saw that the owner field had been filtered. From the administration interface, there is no panel 'Owner' under 'HideVals' so previously I thought that this field was not affected by the plugin. The owner field is already controlled with a dropdown menu thanks to 'restrict_owner' option.
I added 'owner' to 'dont_filter' option and so I got back the good heading.

Not sure if there is something to do here, it's more like a misconfiguration.


Nicolas

Nicolas MARTIN

unread,
Jan 23, 2018, 3:07:17 PM1/23/18
to Trac Users, Ryan Ollos

Finally I think there is a real issue with HideVals occuring in a particular case when a field is entirely removed from the ticket editing, i.e. the permissions group has no allowed entry to see.
For the same ticket, I have checked the ticket box for my "user" account (2 fields removed) and my "dev" account (only filtering values) and I lost the resolution status in the heading with the "user" permissions.

I will open a ticket.


Nicolas

Nicolas MARTIN

unread,
Jan 23, 2018, 3:59:48 PM1/23/18
to Trac Users, Ryan Ollos

RjOllos

unread,
Jan 26, 2018, 6:22:57 PM1/26/18
to Trac Users


On Tuesday, January 23, 2018 at 12:59:48 PM UTC-8, Nicolas MARTIN wrote:

Thanks for tracking that down and filing a ticket. I will try to get it fixed soon.

- Ryan
Reply all
Reply to author
Forward
0 new messages