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

recently-updated macro doesn't return an empty result when no pages match the specified label(s)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.10
    • 2.6.1
    • None

      The documentation in the notation guide for the recently-updated macro specifically states that when a labels parameter is supplied that "content associated with at least one of these will be listed" with emphasis in the documentation on the "at least one" part.

      The online documentation page (http://confluence.atlassian.com/display/DOC/Recently+Updated+Content+Macro) for the macro simply describes the labels parameter as "Filter content using labels".

      In any case, when the recently-updated macro is used with a labels parameter that refers to a label that does not yet exist (because no page has been authored with the label), the macro falls back to producing a simple list of recently updated content regardless of label. In fact, the results listed are accompanied by a generated message that "These labels don't exist and were ignored: (label names)".

      My expectation was that when no pages were found matching "at least one" of the specified labels, that no results would be listed. I had this expectation from the documentation, and also because it made sense to me that if no pages matched the labels that no results would be returned. If I wanted a simple list of recently updated content, I wouldn't have specified a labels parameter.

      My use case is that I have pages in the wiki designed to list pages according to specific labels, such as

      {recently-updated:labels=foo}

      where 'foo' is the label. Once one of my users has authored a page with such a label, then the page correctly lists the one and only corresponding page. However, until a page has been authored with the label, the page misleading provides the user with a list of recent pages with that label, when in fact the listing is clearly a listing of the most recently updated pages regardless of label.

      I'd love to know if this was a recognized issue, whether the documentation is considered to be in error, and whether there are any workarounds.

      Best regards,

      Gavin McKenzie.

            [CONFSERVER-10167] recently-updated macro doesn't return an empty result when no pages match the specified label(s)

            verified fixed in 2.10 rc1
            Issue still occurs in recently-updated-dashboard macro however: CONF-13860

            Andrew Prentice (Inactive) added a comment - verified fixed in 2.10 rc1 Issue still occurs in recently-updated-dashboard macro however: CONF-13860

            SarahA added a comment -

            This confusing behaviour still occurs in Confluence 2.10 m5 on EAC.

            SarahA added a comment - This confusing behaviour still occurs in Confluence 2.10 m5 on EAC.

            SarahA added a comment -

            Removing the 'documentation' component, because the documentation now correctly describes the behaviour. If the behaviour is changed at some point in the future, please update the documentation accordingly at that time.

            SarahA added a comment - Removing the 'documentation' component, because the documentation now correctly describes the behaviour. If the behaviour is changed at some point in the future, please update the documentation accordingly at that time.

            SarahA added a comment -

            Documentation updated to describe the unexpected behaviour and point to this JIRA issue.
            See page: http://confluence.atlassian.com/display/DOC/Recently+Updated+Content+Macro
            Text added:

            If there are no pages matching any of the specified labels, then Confluence will ignore the labels and will list all recently updated pages, as well as showing a message, "These labels don't exist and were ignored: xxx ". This unexpected behaviour is noted in issue CONF-10167.

            SarahA added a comment - Documentation updated to describe the unexpected behaviour and point to this JIRA issue. See page: http://confluence.atlassian.com/display/DOC/Recently+Updated+Content+Macro Text added: If there are no pages matching any of the specified labels, then Confluence will ignore the labels and will list all recently updated pages, as well as showing a message, "These labels don't exist and were ignored: xxx ". This unexpected behaviour is noted in issue CONF-10167 .

            Cheryl Jerozal [Atlassian] added a comment - - edited http://developer.atlassian.com/jira/browse/ADVMACROS-65

            Thanks for the report Gavin.

            I believe at the very least the documentation has not made this macro's behaviour clear. However, I also don't think the behaviour of showing all updates when a label doesn't exist is what would be wanted.
            We'll get this problem prioritised appropriately.

            Paul Curren added a comment - Thanks for the report Gavin. I believe at the very least the documentation has not made this macro's behaviour clear. However, I also don't think the behaviour of showing all updates when a label doesn't exist is what would be wanted. We'll get this problem prioritised appropriately.

            Sorry...after posting I realized that the contentbylabel macro could be used to produce a listing, by label, of references to documents, sorted according to modification date. But this doesn't quite provide the same result as the recently-updated macro, which doesn't require specifying an arbitrary maximum number of results, and informs the user of important information such as the user and time of the recent update – contentbylabel won't provide that functionality for me.

            Gavin.

            Gavin McKenzie added a comment - Sorry...after posting I realized that the contentbylabel macro could be used to produce a listing, by label, of references to documents, sorted according to modification date. But this doesn't quite provide the same result as the recently-updated macro, which doesn't require specifying an arbitrary maximum number of results, and informs the user of important information such as the user and time of the recent update – contentbylabel won't provide that functionality for me. Gavin.

              ndwyer Nathan Dwyer [Atlassian]
              89113b30e2ad Gavin McKenzie
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: