[MAGNOLIA-8496] Versioned publish doesn't respect modifiedOnly parameter Created: 07/Jul/22  Updated: 05/Dec/22  Resolved: 05/Oct/22

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.21
Fix Version/s: 6.3.0, 6.2.25

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by PUBLISHING-132 modifedOnly publishes even published ... Closed
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-8564 Implementation Sub-task Completed Antonín Juran  
MAGNOLIA-8565 Code review Sub-task Completed Antonín Juran  
MAGNOLIA-8566 Pre-integration QA Sub-task Completed Adam Siska  
MAGNOLIA-8567 Final QA 6.2 Sub-task Completed Fernando Cherchi  
MAGNOLIA-8569 Fix addon live-copy test or revert Sub-task Closed Antonín Juran  
MAGNOLIA-8583 QA 6.3 Sub-task Completed Fernando Cherchi  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 19, Nucleus 20
Story Points: 5
Team: Nucleus

 Description   

The VersionCommand creates a version for all pages and passes the versionMap to the PublishCommand. The method collectFromVersionMap checks for the parameter modifiedOnly and the activiation status of the node. But all nodes have a modified state because of creating a new version in VersionCommand. The following check in the method collectFromVersionMap is always true.
See PublicationCommand

if (!isModifiedOnly() || NodeTypes.Activatable.getActivationStatus(node) != NodeTypes.Activatable.ACTIVATION_STATUS_ACTIVATED) {
    nodes.add(node);
} 

Reproduce
Use the recursive publish action from the versioned catalog in the pages-app with the option modifiedOnly.

publishRecursive:
  icon: icon-publish-incl-sub
  $type: jcrCommandAction
  command: publish
  catalog: versioned
  asynchronous: true
  params:
    modifiedOnly: true
    recursive: true
  availability:
    rules:
      notDeleted: *notDeleted
      hasSubPages:
        $type: jcrHasChildrenRule
      isPublishable: *isPublishable

Note
Maybe this kind of configuration is not possible? Versioning + modifiedOnly. In such a case maybe this becomes a docu ticket.



 Comments   
Comment by Roman Kovařík [ 29/Aug/22 ]

What I miss here is an expected behaviour, e.g.

  • version command could have modifiedOnly parameter as well to not create useless versions for an unchanged content.
Comment by Roman Kovařík [ 29/Sep/22 ]

This didn't work as expected (workflow always expect a version to be created so it can be published later)

Can we make sure the creating version does not update the modified date instead?

Generated at Mon Feb 12 04:33:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.