[MAGNOLIA-5502] Template change does not update the status indicator of a page Created: 19/Nov/13  Updated: 20/Nov/13  Resolved: 19/Nov/13

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.1.2
Fix Version/s: 5.1.2, 5.2

Type: Bug Priority: Critical
Reporter: Jozef Chocholacek Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-5351 Moved or deleted items (pages, compon... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: 5.2-rc2

 Description   
  1. open Pages App
  2. select any "green" (already published and not changed since) page
  3. click "Change template"
  4. choose a different template than the current one, click "Save changes"

The template name in the "Template" column is changed, but the status indicator remains the same (green), and should be changed to yellow.



 Comments   
Comment by Milan Divilek [ 19/Nov/13 ]

The problem is in info.magnolia.jcr.wrapper.LastUpdateContentDecorator.updateLastModifiedProperty(String, String, String) method where we ignore "mgln:" properties. So also "mgnl:template" property.

    void updateLastModifiedProperty(String workspaceName, String property, String parentPath) throws RepositoryException {
        if (property.startsWith(NodeTypes.MGNL_PREFIX) || property.startsWith(NodeTypes.JCR_PREFIX)) {
            // our update doesn't count as update (activation, versioning, last update, etc)
            return;
        }
        updateLastModified(workspaceName, parentPath);
    }
Generated at Mon Feb 12 04:05:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.