Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-27762 content/edit routing conflict with legacy #143

Merged
merged 1 commit into from
Sep 20, 2017

Conversation

glye
Copy link
Member

@glye glye commented Aug 11, 2017

Fix https://jira.ez.no/browse/EZP-27762
Ready for review

Ensure our route doesn't conflict with legacy content edit, by changing /content/edit/... to /content/edit/draft/....

Debatable: Renaming the route from ez_content_edit to ez_content_draft_edit, as I've done. The fix is smaller if we don't.

glye referenced this pull request Aug 11, 2017
Spiked route+form to create a draft of an existing content

    Given that a content with id N exists
     When I go to /content/create/draft/N
     Then I see a content draft creation form with the following fields:
          |name|
          |contentId|
          |fromVersionNo|
          |fromLanguage|
          |toLanguage|
     When I submit the form
     Then a draft of the content with id N is created

    (cherry picked from commit 3ab2ce0)

Spiked content edition

    Given a content with id N with a draft number 2 that I can edit
     When I go to /content/edit/N/2
     Then I see a content edit form
     When I click on the publish button
     Then the draft is published

    (cherry picked from commit a6506e2)
Copy link
Contributor

@andrerom andrerom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this, however there might be alternative routes as well to avoid the conflict. So very much interested in hearing what @bdunogier and @yannickroger thinks about this.

@andrerom
Copy link
Contributor

andrerom commented Aug 14, 2017

NOTE: One alternative here is to pick a different verb then edit, could be update to closer adhere to CRUD terminology for instance, content/update next to content/create has a ring to it and avoids three levels of path for this. But lets discuss next week :)

@andrerom andrerom changed the base branch from 1.9 to master August 16, 2017 11:00
@bdunogier
Copy link
Member

could be update to closer adhere to CRUD terminology

Not bad. But the downside is that this resource doesn't only update, it also publishes (if you ask it to). content/edit/draft sounds alright to me.

@bdunogier
Copy link
Member

Also, do we care about the BC break (route change) ?

@andrerom
Copy link
Contributor

Also, do we care about the BC break (route change) ?

Which bc break? This was reverted from stable branch before 1.11 release, so it's only in master.

@lserwatka lserwatka merged commit 8113ee3 into master Sep 20, 2017
@lserwatka lserwatka deleted the ezp27762_content_edit_routing_conflict_legacy branch September 20, 2017 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants