Page Properties Report Macro Filter forgetting the NOT (-)

John Dawson May 2, 2023

I've been using the Page Properties Report Macro, which I've fount to be very useful. I have used the filter feature to filter out certain pages. However, any time I go back into the Macro settings to change something, all the filters loose the "-" prefixes, so that the filters end up filtering for those pages, instead of filtering them out - effectively the opposite of the intention. I have to remember to go back and put the NOT qualifiers back into each filter, every time I edit anything in the Macro. 

 

I'm sure this isn't intended behaviour. The form shouldn't strip out "-" from filter boxes ever time the Macro is edited. Unless I'm missing something. Anyone else experienced this, or can anyone think of anything I might be doing wrong to cause this behaviour? 

 

Thanks,

 

John

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 2023

Hi @John Dawson and welcome to the community,

I wasn't able to reproduce your problem. Adding "-" to labels, will be retained on my instance, even if I edit the page. Can you please write down all the steps you take, in order to be able to reproduce your problem?

John Dawson May 3, 2023

Hi Alex,

Ok, here are my steps. First setting up a working filter for an existing macro:

1. Put confluence page into editing mode, then click on the existing Page Properties Report, and click the edit button at the bottom.

Screenshot 2023-05-03 092123.png

2. Click add a filter. I have experienced this problem using the "Including text" filter and the "With title" filter. I haven't tried "-" in other filters.

3. Add a filter with a "-" (not) modifier. Here I am filtering out pages that contain the word template.

Screenshot 2023-05-03 092759.png

4. Click save and publish the confluence page. The report successfully shows all the pages with the specified label, except for the pages containing the word template. 

 

Then, producing the error:

5. Put confluence page back into editing mode, then click on the existing Page Properties Report, and click the edit button at the bottom.

Screenshot 2023-05-03 092123.png

6. Observe the filters. The "-" character is now missing from the "Including text" filter.

 Screenshot 2023-05-03 093342.png

7. At this point you can make changes to the other fields, or make no changes, but if you click save, the macro will be saved with the changed filter. Now the report lists only pages that contain the word template. The same behaviour happened with the "With title" filter. I haven't tested other filters as well.

 

Edit: so to clarify, this isn't for the labels filter, rather the problem is with other filters

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 2023

@John Dawson thank you for clarifying this!

I was able to reproduce it. However, documentation reads:

For a NOT search, enter a minus sign (-) before the label. This'll exclude everything with that label.

It doesn't say anything about any other filter, which makes me think if the minus should be applicable in the first place (I know it's working with the minus..). I didn't find anything related to your exact problem at jira.atlassian.com, except CONFCLOUD-70713, which is not exactly your problem.

Having said the above you have two choices:

Like John Dawson likes this
John Dawson May 3, 2023

Thank you Alex. I think I will raise a bug report. It is odd behaviour, even if the minus character isn't supposed to be used for all filters. 

 

Ultimately I think I need to find a better way to filter out my template pages. They are identical in every way from production pages, except for the strapline at the top about them being templates, that the user would naturally delete after copying. I could add a template label, which I can filter out, with instructions for the user to remove that label when publishing, but I can see that being missed. I was trying to keep the experience as intuitive as possible, with the fewest steps.

 

I have discovered there is an actual template creation feature, that I haven't tried out yet, so I'll look into that too. 

stevedennisonfido
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 23, 2023

I just ran into this issue and searched a bunch of places for a resolution. My use case was basically having statuses, and wanting to filter out anything that was closed, from a particular table. It seems like the behaviour is intended/designed to not allow "not" type statements, hence it stripping it on edit, however it retains if you start the filter with a non-negative condition, followed by your negative conditions.

Example:

Text includes (this works the first time, but not on subsequent edits):

-"|Status|closed|"

Text includes (this works every time):

"|Status|*|" AND -"|Status|closed|"

Hope that helps anyone running into this in future.

Ally
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 21, 2024

Hi Steve. 

I've tried this work around as my issue is similar 'status = complete'.

The filter did not remove my pages marked with a 'complete' status from the final page property table.

steps I took. 

  • Add filter (including text)
  • tried the following
    • |Status|In progress| AND -|Status|Complete|
    • "|Status|In progress|" AND -"|Status|Complete|"
    • -"|Status|Complete|"
    • -Status|Complete
    • -Complete

Newer confluence user so perhaps I have missed what pipes and quotation marks represent. 

All guidance is welcomed. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events