Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-8648

Unpublish content does not update its current step

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.8.3, 4.0.3, 4.1.0
    • None
    • None
    • None

      After unpublish a content, the content goes in a draft state. But its ametys-internal:currentStep was not updated.

      So, searching on "validated" content, we can have some unpublish content in results

          [CMS-8648] Unpublish content does not update its current step

          Laurence Aumeunier added a comment - - edited

          Missing the post-fonction on unpublish action

          <action id="10" name="plugin.default-workflow:WORKFLOW_ACTION_UNPUBLISH">
          			<restrict-to>
          				<conditions type="AND">
          					<condition type="avalon">
          						<arg name="role">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
          						<arg name="right">Workflow_Rights_Unpublish</arg>
          					</condition>
          					<condition type="avalon">
          						<arg name="role">org.ametys.cms.workflow.LockCondition</arg>
          					</condition>
          					<condition type="avalon">
          						<arg name="role">org.ametys.web.workflow.ContentPublishedCondition</arg>
          					</condition>
          				</conditions>
          			</restrict-to>
                      <pre-functions>
                          <function type="avalon">
                              <arg name="role">org.ametys.web.workflow.UnpublishContentFunction</arg>
                          </function>
                      </pre-functions>
          			<results>
          				<unconditional-result old-status=" " status=" " step="1" />
          			</results>
                      <post-functions>
                          <function type="avalon">
                              <arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
                          </function>
                      </post-functions>
          		</action>
          

          Laurence Aumeunier added a comment - - edited Missing the post-fonction on unpublish action <action id= "10" name= "plugin.default-workflow:WORKFLOW_ACTION_UNPUBLISH" > <restrict-to> <conditions type= "AND" > <condition type= "avalon" > <arg name= "role" > org.ametys.cms.workflow.ContentCheckRightsCondition </arg> <arg name= "right" > Workflow_Rights_Unpublish </arg> </condition> <condition type= "avalon" > <arg name= "role" > org.ametys.cms.workflow.LockCondition </arg> </condition> <condition type= "avalon" > <arg name= "role" > org.ametys.web.workflow.ContentPublishedCondition </arg> </condition> </conditions> </restrict-to> <pre-functions> <function type= "avalon" > <arg name= "role" > org.ametys.web.workflow.UnpublishContentFunction </arg> </function> </pre-functions> <results> <unconditional-result old-status= " " status= " " step= "1" /> </results> <post-functions> <function type= "avalon" > <arg name= "role" > org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction </arg> </function> </post-functions> </action>

            laurence Laurence Aumeunier
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: