Opened 12 years ago
Closed 12 years ago
#10983 closed defect (fixed)
Custom fields appear above default fields with HoursLayoutChanger enabled
Reported by: | Ruth Trevor-Allen | Owned by: | Russ Tyndall |
---|---|---|---|
Priority: | normal | Component: | TimingAndEstimationPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
When the HoursLayoutChanger component is enabled, any custom fields (in my case 'estimated points' and 'order') are displayed above the in-built Trac fields. Screenshot attached.
Seen with Trac 1.0.1.
Attachments (1)
Change History (12)
Changed 12 years ago by
Attachment: | display-problem2.PNG added |
---|
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
I'm just investigating further, it occurred to me that the ticket I was looking at is of a type which doesn't have the T&E custom fields (I'm using CondFieldsGenshiPlugin), and it might only be happening for those tickets.
Unfortunately, I reverted to the old version after I failed the report, so it'll take a little while to check whether I'm right about that, sorry.
comment:3 Changed 12 years ago by
Yep, it's only happening for tickets which don't have the hours fields. So I guess this probably isn't a high priority (but it's your plugin, so I'm not going to tinker with the priority/severity).
comment:4 Changed 12 years ago by
Hmmm... I still dont see what that would be causing that behavior, unless the CondFieldsGenshiPlugin is doing something strange to that tables layout (which seems possible).
If you could copy the html of the table to a comment here (without the HoursLayoutChanger enabled), I might be able to spot whats going on and correct the JS to avoid it.
comment:5 Changed 12 years ago by
Sure:
<table class="properties"> <tbody><tr> <th id="h_reporter">Reported by:</th> <td headers="h_reporter" class="searchable"><a href="/trac/DWBI/query?status=!closed&reporter=ruth">ruth</a></td> <th id="h_owner">Owned by:</th> <td headers="h_owner"><a href="/trac/DWBI/query?status=!closed&owner=ruth">ruth</a></td> </tr> <tr> <th id="h_priority"> Priority: </th> <td headers="h_priority"> <a href="/trac/DWBI/query?status=!closed&priority=high">high</a> </td> <th id="h_milestone" class="missing"> Milestone: </th> <td headers="h_milestone"> <a class="missing milestone" href="/trac/DWBI/milestone/" rel="nofollow"></a> </td> </tr><tr> <th id="h_component"> Component: </th> <td headers="h_component"> <a href="/trac/DWBI/query?status=!closed&component=tools">tools</a> </td> <th id="h_version" class="missing"> Version: </th> <td headers="h_version"> <a href="/trac/DWBI/query?status=!closed&version="></a> </td> </tr><tr> <th id="h_keywords" class="missing"> Keywords: </th> <td headers="h_keywords" class="searchable"> </td> <th id="h_cc" class="missing"> Cc: </th> <td headers="h_cc" class="searchable"> </td> </tr><tr> <th id="h_story_estimate"> Estimated Story Points: </th> <td headers="h_story_estimate"> 5 </td> </tr><tr> <th id="h_ticket_order" class="missing"> Order: </th> <td headers="h_ticket_order"> </td> </tr><tr> </tr><tr> <th class="missing"> </th> <td> </td> </tr> </tbody></table>
I've also discovered it's only happening in IE (don't judge me - I test in the browser most of my coworkers use first!)
There are limits to the tinkering I can do with my work install, but I can try out some more things on my home test env and see if I can get you more information over the weekend.
comment:6 Changed 12 years ago by
Whoops, sorry, that was the buggy one. Here's the HTML without hours layout changer:
<table class="properties"> <tbody><tr> <th id="h_reporter">Reported by:</th> <td headers="h_reporter" class="searchable"><a href="/trac/DWBI/query?status=!closed&reporter=ruth">ruth</a></td> <th id="h_owner">Owned by:</th> <td headers="h_owner"><a href="/trac/DWBI/query?status=!closed&owner=ruth">ruth</a></td> </tr> <tr> <th id="h_priority"> Priority: </th> <td headers="h_priority"> <a href="/trac/DWBI/query?status=!closed&priority=high">high</a> </td> <th id="h_milestone" class="missing"> Milestone: </th> <td headers="h_milestone"> <a class="missing milestone" href="/trac/DWBI/milestone/" rel="nofollow"></a> </td> </tr><tr> <th id="h_component"> Component: </th> <td headers="h_component"> <a href="/trac/DWBI/query?status=!closed&component=tools">tools</a> </td> <th id="h_version" class="missing"> Version: </th> <td headers="h_version"> <a href="/trac/DWBI/query?status=!closed&version="></a> </td> </tr><tr> <th id="h_keywords" class="missing"> Keywords: </th> <td headers="h_keywords" class="searchable"> </td> <th id="h_cc" class="missing"> Cc: </th> <td headers="h_cc" class="searchable"> </td> </tr><tr> <th id="h_story_estimate"> Estimated Story Points: </th> <td headers="h_story_estimate"> 5 </td> </tr><tr> <th id="h_ticket_order" class="missing"> Order: </th> <td headers="h_ticket_order"> </td> </tr><tr> </tr><tr> <th class="missing"> </th> <td> </td> </tr> </tbody></table>
comment:7 Changed 12 years ago by
Ok, those were identical. I seem to be getting Friday-afternoon-itis a day early - must be the cold weather. Sorry!
comment:8 Changed 12 years ago by
Well at least some of the issue is because the the table rows in question have two cells where all the others have 4. I ignore any row with less than 4 cells and then re-layout all the rows with 4 cells. By default all 2 cell rows come before 4 cell rows so this works fine. I will rewrite the code to better handle this case. Thanks again for helping debug
comment:9 Changed 12 years ago by
comment:11 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think that with this change, the javascript should now correctly layout the table. Each row, should now contain 4 cells once we are done laying them out and there should be as few as possible empty cells.
Please let me know if this works for you and thanks again for the bug report, Russ
Thanks again for the bug report.
Not sure why this would be the case, but I will look into it. Timing and estimation has custom fields by default (which is what this is rearranging) and I'm not seeing this behavior. This really shouldn't change the order of anything; I assume usually they appear after the other fields? It should really just be removing extra whitespace (defined as two cells have no content). I will try adding some more custom fields to my test trac and see if I can recreate this.