Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I hide the page history for non-logged people

Dagmar Cervenkova June 2, 2023

Hello,

we would like to publish our documentation and I haven't found anywhere that people who get to our wiki can't access to the page history.

Snímek obrazovky 2023-06-02 v 10.52.53.png

2 answers

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2023

@Kian Stack Mumo Systems is correct - there is a Suggestion you could vote for, but since it's remained open for almost 9 years, I'm not optimistic a vote would make a difference:

HUH. I just thought of an actual use case for Confluence automation.

  • If page status of a page in "Private Staging space" changes to "Ready for Publication".
  • Copy page to "Public Documentation space". (Which will not include page history. Also, it will not include comments, which would also be useful, I think.)

For extra credit, it'd be interesting to see if we could check:

  • If a page in "Ready for Publication" status has been edited after "publication":
    • Archive the old version of the published page
    • Copy new version of the page to the "public space"

The challenges would be:

  • Getting the page history to see when status changed.
  • Archiving a different page than the triggering page.
Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2023

You can use Confluence automation's CQL condition to check when the page was last edited, and you can use the "related entities" branch to archive a specific page

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2023

Thanks @Trev Angle. I guess what I really need is to see if Status was already "Ready for Publication" prior to the edit that triggers a rule. Is there CQL for that?

Actually I'm not even sure how CQL would let you check "when the page was last edited". Doesn't CQL only let you do something like:

lastmodified > 2023-05-01

What I need is a hypothetical Smart Value like this:

{{previousVersionofPage.status}}

So I could compare it against "Ready for Publication" and if it matches, then yeah, I guess if related branches can included COPIED pages. Does Confluence have a concept of links like that? I guess I will see!

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2023

OK, fun experiments! When the trigger is Page status changed it looks that {{content}} contains some very useful values:

previousContentState={contentStateType=custom, id=833650689, color=#8777d9, name=Ready to publish},

currentContentState={contentStateType=space, id=833617923, color=#57d9a3, name=Ready for review}}

But when the trigger is Page edited (without changes in status) previousContentState and currentContentState are NOT POPULATED.

So then, for my extra credit, this lets us find when a PRIVATE page that had been edited (but status has not changed), and archive the old PUBLIC copy of page and then copy the new version over:

Screenshot 2023-06-02 at 5.11.52 PM.png

Combine this with the other rule I described and huh, you now have a "publishing" solution.

ONE PROBLEM:

@Trev Angle can you please explain why Custom statuses are not showing up for the Page Status changed trigger? I DEFINITELY have scoped my rule for a single PRIVATE space which has the "Ready to publish" status, but it's not showing up:Screenshot 2023-06-02 at 5.23.55 PM.pngUntitled.jpg

Is this a known issue?

Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2023

Hi @Darryl Lee,

Unfortunately those extra fields you see on the smart value from the page status changed trigger were added by accident, and they will likely be gone soon. However, I think this is 100% a legitimate use case and I'll bring it up to the team!

As far as the status not showing up, that is expected. Custom statuses are individual, meaning that if you create a custom status, other people won't be able to set that status themselves. Only "suggested" statuses will show up in that picker. However! The good news is that you can change the suggested statuses. If you add a "Ready to publish" suggested status in your space's settings, then it should show up in the automation trigger.

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2023

Ugh, bummer that the hidden smart values I found are going to be going away. They are totally useful, so I appreciate you letting the team know.

And thanks for the education about statuses. They're new to me, so now I understand Custom (personal) Statuses vs Suggested Statuses. However, the trigger documentation  states:

Content statuses are specific to each space. So, if you’re in Global Automation, the trigger can’t provide status selections until you set and save the rule’s Scope (in rule details) to a specific space or spaces. Once the scope is saved, both Suggested and Custom statuses will surface as options

So... that might need an update.

I did a little more testing of my rules, and UGH, Page Title have to be unique even if the conflicting page is Archived? ANNOYING. Also, there is no Rename Page action, so... I have to rename it via a Web Request and API? Oooooy.

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2023

Welp, as often happens, I ended up going down a rabbit hole and decided I might as well write another article nobody asked for:

0 votes
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2023

@Dagmar Cervenkova, as far as I am aware if a user can see the page they can view the history.

 

Thanks,

 

Kian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events