Skip to content

Approve only has same behaviour as "Approve and publish" #120

Closed

Description

@andrewfairlie

Description

When editing a page (in this case a homepage single) the button for "Approve and publish" and "Approve only" seems to do the exact same thing (making the draft published).

Steps to reproduce

  1. Got to an entry, and make a change submission
  2. As a publisher, click "Approve only"
  3. Notice the behaviour

Additional info

  • Plugin version: 1.5.3
  • Craft version: 3.4.18

Activity

  1. engram-design commented on Jun 17, 2020

    @engram-design
    Member

    Hitting "Approve only" should approve the submission and apply the draft, but it shouldn't make the entry live and publicly available - ie, the entry won't be enabled.

    What are you expecting Approve to do? Approving a submission applies the draft onto an entry, essentially deleting the draft by publishing it.

  2. andrewfairlie commented on Jun 17, 2020

    @andrewfairlie
    Author

    Ah I see. We thought that it was for giving users feedback that there content is right, but not yet live.

    For example...

    1. Editor: "Am I going in the right lines with this page?"
    2. Admin: "Yes, looks good - keep going" - "Approve only"

    At that point they've been given the thumbs up on the draft, and can continue making changes, but it's not public yet.

    But now that you've said that, the actual logic ways perfect sense.

  3. engram-design commented on Jun 17, 2020

    @engram-design
    Member

    Yep, so how you've described is how it works. its a little weird with Craft's drafts, but typically for Workflow, you're always dealing with drafts. An editor creates a new draft, submits that - either gets denied or gets approved. If denied, nothing happens, if approved, the draft's content is applied to the original entry.

    I can see how this is a bit confusing though...

  4. markhuot commented on May 23, 2022

    @markhuot

    This just confused us as well so I'm posting to make sure I'm on the correct track.

    1. I'm working with an entry that is already published (enabled and has a post date in the past)
    2. I've created a new draft to update the existing entry and submitted that draft in to workflow (I now have a draftId as well as a submission tracking this)
    3. When I click "Approve and publish" the draft is applied (and the changes are immediately live)
    4. When I click "Approve only" the draft is applied (and the changes are immediately live)

    I think the description above implies that this is the expected behavior? If so would you be open to a new PR that keeps the draft as-is but approves it for tracking purposes? Maybe a new drop-down option called "Approve and save draft." Then your three options could be,

    • Approve and enable
    • Approve without enabling
    • Approve and save draft
  5. JonGoldmanPlaybill commented on May 23, 2022

    @JonGoldmanPlaybill

    To add on to what @markhuot is saying (this is work for our site) we are using a separate plugin that allows us to "schedule" drafts to publish at a specific time. We need to be able to keep the current content live, and have the "approved draft" publish over the content at the time we are specifying for that module.

    Just providing some context on this, so you understand why we would want the "approve only" button.

  6. engram-design commented on May 23, 2022

    @engram-design
    Member

    So I'll make the point that a lot's changed in 2 years on the draft-front, and this probably makes sense to have this behaviour updated to just save the draft instead of publishing it when picking "Approve only".

    This should be updated for the next release. To get this early, change your verbb/workflow requirement in composer.json to:

    "require": {
      "verbb/workflow": "dev-craft-3 as 1.7.3",
      "...": "..."
    }
    

    Then run composer update.

  7. engram-design commented on Jul 1, 2022

    @engram-design
    Member

    Fixed in 1.7.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions