This issue has been created
 
 
Publication Workflow Application / cid:jira-generated-image-avatar-1c881535-37fa-4ac3-8b78-ec5f242be559 XAWORKFLOW-113 Open

Allow to start a workflow from the target page

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-446214f4-a5f1-4d9b-9f6f-be7b3f45daa1 Clemens Robbenhaar created this issue on 19/Jul/24 16:32
 
Summary: Allow to start a workflow from the target page
Issue Type: cid:jira-generated-image-avatar-1c881535-37fa-4ac3-8b78-ec5f242be559 New Feature
Affects Versions: 2.3.2
Assignee: Unassigned
Created: 19/Jul/24 16:32
Priority: cid:jira-generated-image-static-major-6fe4ffca-4272-4ea6-bd6c-cff2989b4dd1 Major
Reporter: Clemens Robbenhaar
Description:

Currently if on a page with no workflow object attached the workflow macro / panel shows the option to start a new workflow.

This always starts with the current page as a draft, which is then published to a selected (different) location.
However often one has an already existing tree of pages, which should remain available at the same place. It is desirable to start the workflow from the original location of the page, and have these pages end up as the target page of the workflow.

Implementation suggestion

Add (yet another) checkbox in the publication workflow macro labeled "start with this page as target" (hopefully not too long).

The setting of the checkbox should be:

  • checked if any of the parent pages has a workflow object with a value of isTarget=1
  • unchecked otherwise
    (I think the "draft space" and "target space" of the workflow can be ignored for now, as they can change when selecting a different workflow.)
    When checking / unchecking the checkbox, the label "Publish Location" might need to be changed via JavaScript to "Draft Location", and also the corresponding description.
    (I am not sure if this can be done easier by show/hide two sections, or replace the text content with javascript.)

Implementation note

There is already a startWorkflowAsTarget in the PublicationWorkflow as API, and the PublicationWorkflow.Script uses this if the action is startastarget. but the UI seems not to used it anywhere.

Possible workarounds / alternatives

The workaround is to move the existing pages to the draft space, start the workflow from there and publish the pages, placing them in the old location.
However this approach has some drawbacks, especially the history of the original page gets lost (from a user point of view, who should not have to care about the move), and also it might be wanted that the pages are not published "with children", but each one separately ... which will create quite a lot of work to click through all the pages