Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-75343

Table Sort Operation is not working on a column that contains mixed Dates and Blanked values

XMLWordPrintable

      Problem

      It is not possible to sort a Confluence Table that contains mixed Blanked and Date values

      Environment

      Reproduced on Confluence Data Center version 7.13.2

      Steps to Reproduce

      • Create a new Confluence page with the storage format below
        <table><colgroup><col /><col /><col /></colgroup>
        <tbody>
        <tr>
        <th>Column 1&nbsp;</th>
        <th>Column 2</th>
        <th>Column 3</th></tr>
        <tr>
        <td>11</td>
        <td>21</td>
        <td>
        <div class="content-wrapper">
        <p><time datetime="2021-12-16" />&nbsp;</p></div></td></tr>
        <tr>
        <td>12</td>
        <td>22</td>
        <td><br /></td></tr>
        <tr>
        <td>13</td>
        <td>23</td>
        <td>
        <div class="content-wrapper">
        <p><time datetime="2021-12-24" />&nbsp;</p></div></td></tr>
        <tr>
        <td>14</td>
        <td>24</td>
        <td><br /></td></tr>
        <tr>
        <td>15</td>
        <td>25</td>
        <td>
        <div class="content-wrapper">
        <p><time datetime="2021-12-31" />&nbsp;</p></div></td></tr></tbody></table>
      • Save the page and attempt to sort the table by Column 3 values

      Expected Results

      • The table should get correctly sorted for the rows that contain correct Dates and even if some rows contain blank/empty values

      Actual Results

      • The table is not properly sorted correctly and the Console log will return error message below:
        batch.js?highlightactions=true:7 Uncaught TypeError: Cannot read properties of null (reading 'attributes')
            at Object.format (batch.js?highlightactions=true:7)
            at c (batch.js?gatekeeper-ui-v2=true&healthcheck-resources=true&highlightactions=true&hostenabled=true&locale=en-GB&user-logged-in=true:2099)
            at HTMLTableCellElement.<anonymous> (batch.js?gatekeeper-ui-v2=true&healthcheck-resources=true&highlightactions=true&hostenabled=true&locale=en-GB&user-logged-in=true:2099)
            at HTMLTableCellElement.dispatch (batch.js?locale=en-GB:54)
            at HTMLTableCellElement.v.handle (batch.js?locale=en-GB:54)
        format @ batch.js?highlightactions=true:7
        c @ batch.js?gatekeeper-ui-v2=true&healthcheck-resources=true&highlightactions=true&hostenabled=true&locale=en-GB&user-logged-in=true:2099
        (anonymous) @ batch.js?gatekeeper-ui-v2=true&healthcheck-resources=true&highlightactions=true&hostenabled=true&locale=en-GB&user-logged-in=true:2099
        dispatch @ batch.js?locale=en-GB:54
        v.handle @ batch.js?locale=en-GB:54

      Workaround

      N/A

      Notes

      Screenshot attached for the issue reproduced locally

              Unassigned Unassigned
              2e857505f334 Pascal Oberle
              Votes:
              29 Vote for this issue
              Watchers:
              23 Start watching this issue

                Created:
                Updated:
                Resolved: