Ticket #3178 (closed defect: fixed)

Opened 3 months ago

Last modified 1 week ago

Conflict with timingandestimation plugin

Reported by: raa Assigned to: 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

screenshot.png (14.0 kB) - added by raa on 06/12/08 09:53:04.

Change History

06/12/08 09:53:04 changed by raa

  • attachment screenshot.png added.

06/12/08 10:41:41 changed 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?)

06/13/08 12:27:58 changed by k0s

  • status changed from new to assigned.

06/13/08 12:40:07 changed by anonymous

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

06/13/08 14:28:28 changed 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.

(follow-up: ↓ 6 ) 06/13/08 15:17:04 changed by k0s

  • status changed from assigned to closed.
  • resolution set to fixed.

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

(in reply to: ↑ 5 ) 06/16/08 06:31:05 changed by raa

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

06/16/08 08:26:13 changed by k0s

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

06/18/08 06:48:56 changed 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.

08/26/08 14:42:31 changed by k0s

see also trac:#7562


Add/Change #3178 (Conflict with timingandestimation plugin)




Change Properties
Action