This issue has been created
There is 1 update.
 
 
Blog Application / cid:jira-generated-image-avatar-d942f51d-0e03-4fc9-ad71-220f4bdf4996 BLOG-286 Open

Move the logic that resolves where a blog's posts and categories are located to Java

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b7bde645-7efb-4bb9-b49c-fbba174b6353 Vincent Massol created this issue on 23/Oct/26 20:16
 
Summary: Move the logic that resolves where a blog's posts and categories are located to Java
Issue Type: cid:jira-generated-image-avatar-d942f51d-0e03-4fc9-ad71-220f4bdf4996 Task
Affects Versions: 9.15.14
Assignee: Unassigned
Components: Development Issues only
Created: 23/Oct/26 20:16
Priority: cid:jira-generated-image-static-major-7e3beaae-7d47-4389-a1ee-eaf0e2b92bdc Major
Reporter: Vincent Massol
Description:

Why

Today the rules that decide which blog a page belongs to, where a blog's posts are stored and where its categories are stored are implemented in Velocity, spread over many wiki pages:

  • the Blog.BlogCode macros #getBlogDocument, #getBlogPostsLocation, #getBlogCategoriesLocation and #getBlogDocumentForCategoriesSpace
  • Blog.BlogParameters, Blog.CategoriesCode, Blog.ManageCategories, Blog.Management, Blog.CreatePost, Blog.BlogPostSheet, Blog.CategoryRss, Blog.BlogPostList
  • the categories and related blogs panels

The same rules are re-implemented, with slight differences, in several of these places. This has caused several bugs (BLOG-271, BLOG-272, BLOG-277, BLOG-278, BLOG-279, BLOG-281, BLOG-283, BLOG-284) and makes the rules hard to unit test.

Goal

  • Resolve these locations in a single Java module, exposed through the blog script service ($services.blog).
  • Keep the existing Velocity macros for backward compatibility, as one-line delegates to the script service.
  • Make the wiki pages call the script service directly.
  • Introduce a small storage seam (blog posts using a category, subcategories of a category, legacy categories of a wiki, moving a category) with an XWQL-based production implementation, so that the location logic, CategoryRenameListener and CategoryLocationMigration can be unit tested without faking queries.

Scope

This is a refactoring with no change in behaviour: the existing characterization tests (BLOG-269) must stay green, including the ones pinning known bugs. Those bugs are fixed afterwards, each in its own issue.

 
 

1 update

 
cid:jira-generated-image-avatar-b7bde645-7efb-4bb9-b49c-fbba174b6353 Changes by Vincent Massol on 23/Oct/26 20:16
 
Assignee: Vincent Massol