Opened 12 years ago
Closed 7 years ago
#10547 closed defect (fixed)
Plugin seems to interfere with custom field ordering
Reported by: | Chris Nelson | Owned by: | Russ Tyndall |
---|---|---|---|
Priority: | high | Component: | TimingAndEstimationPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
I'm using TimingAndEstimationPlugin with MasterTickets, Subtickets, and EstimationTools plugins and I'm seeing strange behavior with regard to how custom fields are displayed.
A ticket type with no custom fields has 8 standard fields at the top:
Reporter | Owner |
Priority | Milestone |
Component | Version |
CC | Keywords |
My custom fields are ordered:
field | order |
estimatedhours | 0 |
confidence | 1 |
blockedby | 2 |
blocking | 3 |
build | 4 |
hours | 5 |
totalhours | 6 |
customer | 7 |
defectcause | 8 |
supplier_name | 9 |
supplier_id | 10 |
supplier_pn | 11 |
supplier_contact | 12 |
userfinish | 13 |
parents | 14 |
If I add in estimatedhours, a locally-defined field (confidence), and blockedby, and blocking, they are after Keywords:
Reporter | Owner |
Priority | Milestone |
Component | Version |
CC | Keywords |
Estimated Hours | Confidence |
Depends On | Required For |
When I add hours, it gets added before keywords:
Reporter | Owner |
Priority | Milestone |
Component | Version |
CC | <empty place for hidden hours> |
Keywords | Estimated Hours |
Confidence | Depends On |
Required For |
then a few fields continue being added after hours, before keywords then the addition resumes at the end of the custom fields. I eventually end up with:
Reporter | Owner |
Priority | Milestone |
Component | Version |
CC | Build |
empty | Total Hours |
Keywords | Estimated Hours |
Confidence | Depends On |
Required For | Due Date |
Parent Ticket |
I'm using 0.8.8 but I've diff'd against 1.2.7 and can't see anything related to the field positioning.
Any thoughts on resolving this would be welcome.
Attachments (0)
Change History (19)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
I'm also using TicketExtPlugin 0.3. Perhaps there is some interaction.
comment:3 Changed 12 years ago by
I upgraded to TicketExtPlugin 0.3.2 (the latest for 0.11) and still see the problem.
comment:4 Changed 12 years ago by
With TicketExt disabled, I still see fields in the wrong order (some before keywords, some after).
comment:5 Changed 12 years ago by
With all T&E components disabled, I still see fields out of order. (Though Add Hours to Ticket is displayed instead of hidden.)
comment:6 follow-up: 8 Changed 12 years ago by
There is a component (or two) in T&E that changes field order / removes whitespace... you can probably just disable those component to get your fields displaying in the correct order.
Add Hours to Ticket gets moved next to the comment box by default (so it shouldn't be hidden ever, simply moved out of the rest of the fields).
- HoursLayoutChanger — This moves the add hours box up to underneath the comment box. This prevents needing to expand the "Modify Ticket" section to add hours and a comment
- TicketPropsLayoutChanger — This removes extra whitespace rendered to the ticket properties box (and will rearrange fields to do this).
If disabling these two Components doesn't solve it, then I dont think it is something this plugin is doing.
comment:7 follow-up: 12 Changed 12 years ago by
Also which version of trac are you running? It is possible there is a bug in trac's ordering of these boxes by default (though it seems unlikely).
I too have had a very difficult time getting the boxes to be arranged in a specific order that doesnt change between different trac instances. Not sure what the answer here is. That is part of why I ended up just moving the hours up to near the comment box.
comment:8 Changed 12 years ago by
Replying to bobbysmith007:
There is a component (or two) in T&E that changes field order / removes whitespace... you can probably just disable those component to get your fields displaying in the correct order.
Add Hours to Ticket gets moved next to the comment box by default (so it shouldn't be hidden ever, simply moved out of the rest of the fields).
That sounds like you're referring to the bottom of the ticket page where you can add and change values. I'm talking about the first box on the page where current values are displayed.
- HoursLayoutChanger — This moves the add hours box up to underneath the comment box. This prevents needing to expand the "Modify Ticket" section to add hours and a comment
- TicketPropsLayoutChanger — This removes extra whitespace rendered to the ticket properties box (and will rearrange fields to do this).
If disabling these two Components doesn't solve it, then I dont think it is something this plugin is doing.
Even with all T&E components disabled, the fields are in the wrong place. Does any installed JavaScript honor the component enabling/disabling?
comment:9 follow-up: 10 Changed 12 years ago by
I'm talking about the first box on the page where current values are displayed
Ahh... Im sorry I thought you were talking about the fields in the "Modify Ticket" section.
Any installed javascript will definitely honor the component enabling/disabling. All javascript is added from within a component (which should only be around if enabled).
Im not totally sure trac pays any attention to order when displaying the fields. I am fairly sure the order is only used in the modify section, but I am looking in the trac source to verify this assumption.
comment:10 Changed 12 years ago by
Replying to bobbysmith007:
I'm talking about the first box on the page where current values are displayed
Ahh... Im sorry I thought you were talking about the fields in the "Modify Ticket" section.
Any installed javascript will definitely honor the component enabling/disabling. All javascript is added from within a component (which should only be around if enabled).
Im not totally sure trac pays any attention to order when displaying the fields. I am fairly sure the order is only used in the modify section, but I am looking in the trac source to verify this assumption.
I've been poking in Trac source, too. It appears that custom fields are added in order. ticket/api.py:_get_custom_fields()
sorts by order before returning.
comment:11 follow-up: 13 Changed 12 years ago by
- Custom fields seem are sorted by order then name
- I am not seeing anywhere that all fields are ordered after this. If we look at the fields function it builds up the list of fields by appending things into a list then returning it. I'm not seeing where anything sorting after that, though something must change their order because all customs should come after keywords.
- I just looked at a couple of my trac environments (we run about 20), and the ones I checked all had all custom fields appearing after keywords/CC, so I strongly suspect that its not entirely the fault of T&E (though this plugin could be exacerbating something else).
- I noticed that the TicketWebUiAddon Component does add some javascript (when enabled) that changes stuff in that section (but mostly by hiding stuff and displaying float hours as hours and minutes). Even with this enabled all my custom fields appear after all standard trac fields.
- You could try disabling js in your browser to see if that fixes it. You could also try disabling all plugins to verify that it is one of the plugins causing this (assuming they all add JS correctly and only when enabled).
Hope this helps, Please let me know if there is more I can do
comment:12 Changed 12 years ago by
Replying to bobbysmith007:
Also which version of trac are you running? It is possible there is a bug in trac's ordering of these boxes by default (though it seems unlikely).
0.11.6.
I too have had a very difficult time getting the boxes to be arranged in a specific order that doesnt change between different trac instances. Not sure what the answer here is. That is part of why I ended up just moving the hours up to near the comment box.
Everything I find says that the fields are handled in the configured order with some exception for textarea-type fields.
My working theory is that I don't have Severity configured in my system and it is somehow using the empty cell in the top table that would be used by Severity but that doesn't really make sense.
I've dumped out the list of fields after ticket/api.py
builds it and it is in the right order. I can't figure out how to instrument the Genshi template to log how it is handling fields.
comment:13 Changed 12 years ago by
Replying to bobbysmith007:
Yes, I found that, too.
- I am not seeing anywhere that all fields are ordered after this. If we look at the fields function it builds up the list of fields by appending things into a list then returning it. I'm not seeing where anything sorting after that, though something must change their order because all customs should come after keywords.
You'd think so. It's hard to be sure but I *swear* when my system is bogged down I *see* it insert before Keywords so it seems Keywords is processed then the later fields get put in the wrong place.
- I just looked at a couple of my trac environments (we run about 20), and the ones I checked all had all custom fields appearing after keywords/CC, so I strongly suspect that its not entirely the fault of T&E (though this plugin could be exacerbating something else).
OK. Thanks.
- I noticed that the TicketWebUiAddon Component does add some javascript (when enabled) that changes stuff in that section (but mostly by hiding stuff and displaying float hours as hours and minutes). Even with this enabled all my custom fields appear after all standard trac fields.
Don't have that one.
- You could try disabling js in your browser to see if that fixes it. You could also try disabling all plugins to verify that it is one of the plugins causing this (assuming they all add JS correctly and only when enabled).
No. With JavaScript disabled -- FireBug complains when I open it -- my fields are still in the wrong order.
Hope this helps,
Not much. But thanks for looking into it.
Please let me know if there is more I can do
If I think of something, I will.
comment:14 Changed 12 years ago by
I changed all the layout changing javascript in #10977, perhaps this problem is solved now? (Though previous comments implied that this javascript was not the culprit)
comment:15 Changed 10 years ago by
I think I have the same issue, see: trac:#11751
Can someone verify that these are related? Is there a solution yet?
comment:16 Changed 10 years ago by
Your bug doesn't seem directly related to this ticket but your bug could the fault of this plugin.
You could try disabling the HoursLayoutChanger subcomponent in trac admin and see if that solves your issue.
Cheers
comment:19 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This bug is probably unrelated, but I further rewrote the HoursLayoutChanger to try and be more predictable and respect long fields see #11657
1.2.7 shows the same issue. (I'm on Trac 0.11.6.)