Modify

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#3178 closed defect (fixed)

Conflict with timingandestimation plugin

Reported by: raa Owned by: k0s
Priority: normal Component: AutoQueryPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

I have got some custom fields produced by timingandestimation plugin. And it seems that AutoQuery breaks those fields. It is probably because timingandestimation do not expect html code in own field values. Pelase see the attached screenshot.

Could you please advice some solution or workaround?

Attachments (1)

screenshot.png (14.0 KB) - added by raa 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by raa

comment:1 Changed 7 years ago by k0s

i'll install timing and estimation when i can (probably tomorrow) and see if I can reproduce; what should be displayed in the NaNh fields? (some number, i assume?)

comment:2 Changed 7 years ago by k0s

  • Status changed from new to assigned

comment:3 Changed 7 years ago by anonymous

Thanks. There should be hours. 1h, 16h, etc. So the "h" character is still there. However the numbers are replaced with "NaN".

comment:4 Changed 7 years ago by k0s

The issue here is the JS. the TimingAndEstimationPlugin loads JS that tries to markup the field and so when it finds the link instead of a number it "blows up" (prints NaNh). So this can't really be "fixed" in any meaningful way. Disabling JS and loading a ticket page displays the correct results ( http://localhost:14828/barproj/query?estimatedhours=5&order=priority , which functions correctly ).

I will enable a workaround, which is to limit the fields that the AutoQueryPlugin acts on, so that these fields can be marked not to display the link. Any better ideas on how to have these fields AutoQuery-able and function with TimingAndEstimationPlugin would be welcome.

As a complete aside, this is a disadvantage of component architecture as implemented in trac and most everywhere else it is used. The plugins have a contract with the master program, so each plugin should work with it correctly. But plugins have no contract with other plugins so conflicts can arise when two plugins are installed. As an example, AutoQueryPlugin will not work with anything that tests filename == 'ticket.html', e.g. the TicketSubmitPolicyPlugin. This is an oversight and an example of bad plugin design; the would-be fix is documented in http://trac-hacks.org/ticket/3161 . I don't have a cheap fix for this general problem, except to try to design plugins that play nice with one another.

comment:5 follow-up: Changed 7 years ago by k0s

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3836]) add excluded_fields to not be marked up by AutoQuery; fixes #3178

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

Thank you very much for the workaround and for the great work.

comment:7 Changed 7 years ago by k0s

Thank you for the feedback! If you come up with a better solution to this problem, please let me know.

comment:8 Changed 7 years ago by raa

I'm not an expert in Python and Trac, so I think your solution is always better of mine :-) Actually I think the current solution with excluded fields is good. It is exactly what I'd like to have.

comment:9 Changed 6 years ago by k0s

see also trac:#7562

Add Comment

Modify Ticket

Action
as closed The owner will remain k0s.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.