Modify

#10983 closed defect (fixed)

Custom fields appear above default fields with HoursLayoutChanger enabled

Reported by: fleeblewidget Owned by: bobbysmith007
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)

display-problem2.PNG (9.7 KB) - added by fleeblewidget 20 months ago.

Download all attachments as: .zip

Change History (12)

Changed 20 months ago by fleeblewidget

comment:1 Changed 20 months ago by bobbysmith007

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.

comment:2 Changed 20 months ago by fleeblewidget

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 20 months ago by fleeblewidget

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 20 months ago by bobbysmith007

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 20 months ago by fleeblewidget

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&amp;reporter=ruth">ruth</a></td>
      <th id="h_owner">Owned by:</th>
      <td headers="h_owner"><a href="/trac/DWBI/query?status=!closed&amp;owner=ruth">ruth</a></td>
    </tr>
    <tr>
        <th id="h_priority">
          Priority:
        </th>
        <td headers="h_priority">
              <a href="/trac/DWBI/query?status=!closed&amp;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&amp;component=tools">tools</a>
        </td>
        <th id="h_version" class="missing">
          Version:
        </th>
        <td headers="h_version">
              <a href="/trac/DWBI/query?status=!closed&amp;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 20 months ago by fleeblewidget

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&amp;reporter=ruth">ruth</a></td>
      <th id="h_owner">Owned by:</th>
      <td headers="h_owner"><a href="/trac/DWBI/query?status=!closed&amp;owner=ruth">ruth</a></td>
    </tr>
    <tr>
        <th id="h_priority">
          Priority:
        </th>
        <td headers="h_priority">
              <a href="/trac/DWBI/query?status=!closed&amp;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&amp;component=tools">tools</a>
        </td>
        <th id="h_version" class="missing">
          Version:
        </th>
        <td headers="h_version">
              <a href="/trac/DWBI/query?status=!closed&amp;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 20 months ago by fleeblewidget

Ok, those were identical. I seem to be getting Friday-afternoon-itis a day early - must be the cold weather. Sorry!

comment:8 Changed 20 months ago by bobbysmith007

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 20 months ago by bobbysmith007

(In [12831]) better table reorganizer - handles twocell-rows in tables of four-cell rows re #10983

comment:10 Changed 20 months ago by bobbysmith007

(In [12832]) comment out console.log re #10983

comment:11 Changed 20 months ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to 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

Add Comment

Modify Ticket

Action
as closed The owner will remain bobbysmith007.
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.