Modify

Opened 6 years ago

Last modified 5 years ago

#4464 new enhancement

Field labels are still shown when field is hidden

Reported by: jevans Owned by: obs
Priority: low Component: TicketSubmitPolicyPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 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.

Attachments (0)

Change History (9)

comment:1 Changed 6 years ago by anonymous

I have the same issue with 0.11.4

comment:2 Changed 5 years ago by rjollos

  • Cc rjollos added; anonymous removed

comment:3 follow-up: Changed 5 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: Changed 5 years ago by k0s

Replying to 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.

Ideally, these plugins should be combined.

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

Replying to k0s:

Replying to 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.

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: Changed 5 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.

$("#field-" + excludedfields[i]).parents("tr").show();

comment:7 in reply to: ↑ 6 Changed 5 years ago by anonymous

Sorry, that should be exclude.js not excludes.js

Replying to 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.

$("#field-" + excludedfields[i]).parents("tr").show();

comment:8 Changed 5 years ago by k0s

  • Priority changed from normal to low
  • Type changed from defect to 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 5 years ago by obs

  • Owner changed from k0s to obs

Add Comment

Modify Ticket

Action
as new The owner will remain obs.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.