Opened 9 years ago

Field labels are still shown when field is hidden

Reported by: Owned by: J Evan S obs low TicketSubmitPolicyPlugin normal Ryan J Ollos 0.11

Description

I still see the field labels when fields are hidden. I would expect them to be hidden also.

I'm using Firefox 3, Trac 0.11.2.1, and several other plug-ins.

comment:1 Changed 9 years ago by anonymous

I have the same issue with 0.11.4

comment:2 Changed 9 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:3 follow-up:  4 Changed 9 years ago by Tony

This same issue also occurs in blackmaginetickettweak plugin. If the user create a new field and assign it a label in blackmaginetickettweak the label will still be visible if the field is set to be hide. A cooperation between blackmaginetickettweak and ticketsubmitpolicy can be useful for both.

comment:4 in reply to:  3 ; follow-up:  5 Changed 9 years ago by Jeff Hammel

This same issue also occurs in blackmaginetickettweak plugin. If the user create a new field and assign it a label in blackmaginetickettweak the label will still be visible if the field is set to be hide. A cooperation between blackmaginetickettweak and ticketsubmitpolicy can be useful for both.

Ideally, these plugins should be combined.

comment:5 in reply to:  4 Changed 9 years ago by anonymous

This same issue also occurs in blackmaginetickettweak plugin. If the user create a new field and assign it a label in blackmaginetickettweak the label will still be visible if the field is set to be hide. A cooperation between blackmaginetickettweak and ticketsubmitpolicy can be useful for both.

Ideally, these plugins should be combined.

BlackMagicTicketTweakPlugin also works on Trac 0.12. I was not able to make TicketSubmitPolicyPlugin work (hide the field) on 0.12 (as the ticket I have just created "Compatibility with Trac 0.12"). But with BlackMagicTicketTweakPlugin I was able to set hide fields. You could check the BlackMagicTicketTweakPlugin source for conparison with yours. BlackMagic also uses JS.

comment:6 follow-up:  7 Changed 9 years ago by anonymous

I found this easy to resolve by editing the excludes.js file.

I'm was not sure though if this plugin is supposed to exclude fields even when viewing a ticket, or just on ticket submissions - I suppose it shouldn't be so difficult to do the latter, but I imagine it'd be better to use genshi for that.



comment:8 Changed 9 years ago by Jeff Hammel

Priority: normal → low defect → enhancement

TicketSubmitPolicyPlugin shows the fields by design, according to a request. Since the plugin uses a pluggable policy architecture, I recommend writing a policy that does what you want. If appropriate, I will include it with the core code.

See source:ticketsubmitpolicyplugin/0.11/ticketsubmitpolicy/policies.py for how these are implemented.

I'm also completely down if anyone wants to help make this plugin better (it was written on request from a boss and then never used) and/or combine it with BlackMagicTicketTweaksPlugin

comment:9 Changed 8 years ago by obs

Owner: changed from Jeff Hammel to obs

Modify Ticket

Change Properties