confluencebuilder icon indicating copy to clipboard operation
confluencebuilder copied to clipboard

Permalink support

Open girivs82 opened this issue 2 years ago • 4 comments

Scenario 1:

  1. We publish a document under a parent page based on the confluence_parent_page param
  2. Unknown to us, someone has changed the name/title of the parent page, but the permalink is the same
  3. Since we use the actual name/title, the build would fail

Scenario 2:

  1. We publish a document under a valid parent page and the page title in confluence is based on the title of the source document
  2. Someone wants to modify the name/title of the page in confluence.
  3. When we republish, now it would create a new document rather than an update since the original document has been renamed.

In both these cases, if we were to use permalink rather than the title name, we would be good.

Thoughts?

girivs82 avatar May 29 '22 14:05 girivs82

One approach would be to utilize the confluence_publish_root option instead. Specifying the fixed identifier of the page you wish to consider as the "root" document should provide a consistent publishing point; however, this may only work gracefully if confluence_page_hierarchy is set to True.

But I can imagine there can be some cases where a user may wish to refer to a fixed parent container, if hierarchy is disabled or if a user has a custom configuration process across multiple documentations. There isn't an ideal solution at this time to force publishing in a container page which may change its title value. The only somewhat-helpful solution now would be to utilize confluence_parent_page_id_check to prevent publications from happening if the title value is changed.

What may be good in a future change is to tweak confluence_parent_page to accept either a title string value (existing capability) or a page identifier (numeric) -- and possibly dropping confluence_parent_page_id_check. I assume such an enhancement may cover your use case, if confluence_publish_root is not the configuration you are looking to use.

jdknight avatar May 29 '22 15:05 jdknight

I can try confluence_publish_root for the parent. I'm also looking to customise the configuration for multiple docs, so not sure this will work for all cases. So ye, I think your future change still makes sense.

girivs82 avatar May 29 '22 15:05 girivs82

Changes (#666) have been made to the confluence_parent_page configuration which supports either a document's title name (original implementation) as well as a fixed page identifier value. This change has been added into the main branch and should be made available next stable release. If users wish to use this capability before a release is made, the development version of this extension can be installed.

jdknight avatar Jun 04 '22 16:06 jdknight

Thanks for the very quick change! I will be sure to use it when it is released. I will of course test out the development version as well.

girivs82 avatar Jun 04 '22 17:06 girivs82

v1.9 is now available on PyPI -- marking as closed.

jdknight avatar Aug 21 '22 18:08 jdknight