There is 1 update.
 
 
Publication Workflow Application / cid:jira-generated-image-avatar-3d71be11-de70-4d48-9dc4-f352f98de25f XAWORKFLOW-115 Open

Move strategy is not working anymore

 
View issue   ·   Add comment
 

1 update

 
cid:jira-generated-image-avatar-2d6a26f5-b3c7-465f-9124-16271b8a5256 Changes by Alex Cotiugă on 30/Jul/24 13:18
 
Description: In https://jira.xwiki.org/browse/XAWORKFLOW-59 a new feature was introduced to Move a Draft when a Target is renamed, and vice versa.
Currently, the feature is blocked by the doc.isNew() check from [here|
[https://github.com/xwiki-contrib/workflow-publication/blob/master/xwiki-workflow-publication-api/src/main/java/org/xwiki/workflowpublication/internal/PublicationWorkflowRenameListener.java #L383]] and [here|https://github.com/xwiki-contrib/workflow-publication/blob/master/xwiki-workflow-publication-api/src/main/java/org/xwiki/workflowpublication/internal/PublicationWorkflowRenameListener.java#L383] which is returning true all the time, making the code that follows to not be reached.

There are several problems with moving action:
* children are not moved along with the draft/target parent (the *includeChildren* field is not taken into account)
* titles are not updated in the equivalent document (if the draft is renamed, the title of the target is not changed to the new one)
* target field is not updated with the new value in the equivalent document (if the draft is renamed, the target field in the target is not changed to the new one, and an old value is hanging with to purpose).

Since the parent version of the application was updated to 12.10.4, there's the option to implement the renaming/moving action using the standard operations and the new available events.