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

Page Properties Report macro "Sort by" for date values does not work when date is added via a user macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.15.9, 7.19.2
    • None

    Description

      Issue Summary

      The Page Properties Report macro does not sort correctly when using the "Sort by" display option on a column that contains dates that are added via a user macro, as opposed to using date picket.

      Environment

      In order for the test to be accurate, you need an existing Confluence instance with pages already created in different dates

      Steps to Reproduce

      1. Create a user macro named "CreateDate" with the following code:
         ## @noparams
         #set( $createD = $content.getCreationDate())<time Datetime="$action.dateFormatter.formatGivenString("yyyy-MM-dd", $createD)"/>
      1. On the older page, add a Page Properties macro with the following table:
        Description <enter some text>
        Created <insert the macro "CreateDate">
      1. On the newer page add a Page Properties macro as in the previous step;
      2. Add the label "testdate" to the 2 pages;
      3. Create a new page and add the Page Properties Report macro configured with the "testdate" label and the Sort by display option set to "Created".

      Expected Results

      The table should be sorted by the "Created" column.

      Actual Results

      The table is sorted by last modified date, as default.

      Workaround

      Currently there is no other workaround for this behavior except for entering date via the Date Picker macro. Clicking on the column with the dates will sort the table correctly as only the initial sorting is affected by this issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bcosta@atlassian.com Bruno Costa (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: