Details

      Description

      For now, the edit process always creates a new version based on the content's current version. As a result, there's no way to edit a given draft version that was left by a previous edit operation.

      This is blocking the implementation of the flex workflow (EZS-322) and this will be needed when we'll expose the versions of a content.

        Issue Links

          Activity

          Hide
          Piotr Nalepa added a comment -

          This feature is required for development of Flex Workflow.

          Show
          Piotr Nalepa added a comment - This feature is required for development of Flex Workflow.
          Hide
          Damien Pobel (Inactive) added a comment - - edited

          Dev notes: a possible way to solve that would be to add a new route based on "editContent". This route would accept in addition a version id to edit. This would involve various additional check and some changes in the content edit view service:

          • when a version id is provided, the version has to be loaded with the REST API
          • we have to check it has the "DRAFT" status
          • we have to check it's a version of the given Content
          • we have to check if the languageCode parameter is consistent
          • that also means the content might not have a main location yet, so we have to condition the main location loading and tweak the redirection logic
          • the location is also expected by the view and maybe some plugins, so we have to check how the location is used and reflect the fact it might not be there
          Show
          Damien Pobel (Inactive) added a comment - - edited Dev notes: a possible way to solve that would be to add a new route based on "editContent". This route would accept in addition a version id to edit. This would involve various additional check and some changes in the content edit view service: when a version id is provided, the version has to be loaded with the REST API we have to check it has the "DRAFT" status we have to check it's a version of the given Content we have to check if the languageCode parameter is consistent that also means the content might not have a main location yet, so we have to condition the main location loading and tweak the redirection logic the location is also expected by the view and maybe some plugins, so we have to check how the location is used and reflect the fact it might not be there
          Hide
          Damien Pobel (Inactive) added a comment - - edited

          Additional tasks discovered along the way:

          • fix the JavaScript REST client to properly load a version in a lang
          • workaround EZP-25152
          Show
          Damien Pobel (Inactive) added a comment - - edited Additional tasks discovered along the way: fix the JavaScript REST client to properly load a version in a lang workaround EZP-25152
          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/PlatformUIBundle/pull/442
          Hide
          Damien Pobel (Inactive) added a comment -

          Merged in master https://github.com/ezsystems/PlatformUIBundle/commit/c09cae63163d781c60b4bea8cd41a89895e7e561

          This also requires a fix in the JavaScript REST Client https://github.com/ezsystems/ez-js-rest-client/commit/d9c320d157dcafd431228d7b250694a15839d25c which provided by PlatformUIAssetsBundle 1.0.0-beta5.

          Show
          Damien Pobel (Inactive) added a comment - Merged in master https://github.com/ezsystems/PlatformUIBundle/commit/c09cae63163d781c60b4bea8cd41a89895e7e561 This also requires a fix in the JavaScript REST Client https://github.com/ezsystems/ez-js-rest-client/commit/d9c320d157dcafd431228d7b250694a15839d25c which provided by PlatformUIAssetsBundle 1.0.0-beta5.
          Hide
          Damien Pobel (Inactive) added a comment - - edited

          For QA, it's not super easy to test since there's no link to the edition of a draft but basically to test it you can try to create a content or update an existing one then click on save to save/create a draft and to retrieve the version id and then load the following URL:

          /ez#/edit/<urlencoded REST content id>/version/<urlencoded REST version id>/<languageCode>

          which gives something like:

          /ez#/edit/%2Fapi%2Fezp%2Fv2%2Fcontent%2Fobjects%2F170/version/%2Fapi%2Fezp%2Fv2%2Fcontent%2Fobjects%2F170%2Fversions%2F1/eng-GB
          

          After that, you can normally operate in the edit form. The main difference to expect is on redirection if you edit a DRAFT of a content which has never been published. In this case after discard or by closing the edit view, you are redirected to the dashboard.

          Show
          Damien Pobel (Inactive) added a comment - - edited For QA, it's not super easy to test since there's no link to the edition of a draft but basically to test it you can try to create a content or update an existing one then click on save to save/create a draft and to retrieve the version id and then load the following URL: /ez#/edit/<urlencoded REST content id>/version/<urlencoded REST version id>/<languageCode> which gives something like: /ez#/edit/%2Fapi%2Fezp%2Fv2%2Fcontent%2Fobjects%2F170/version/%2Fapi%2Fezp%2Fv2%2Fcontent%2Fobjects%2F170%2Fversions%2F1/eng-GB After that, you can normally operate in the edit form. The main difference to expect is on redirection if you edit a DRAFT of a content which has never been published. In this case after discard or by closing the edit view, you are redirected to the dashboard.
          Hide
          Miguel das Neves Jacinto (Inactive) added a comment -

          QA Approved

          Show
          Miguel das Neves Jacinto (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Piotr Nalepa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: