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

Set up a Workflow without Notification Email #519

Open
2 tasks done
thisisannie opened this issue Jan 31, 2024 · 1 comment
Open
2 tasks done

Set up a Workflow without Notification Email #519

thisisannie opened this issue Jan 31, 2024 · 1 comment

Comments

@thisisannie
Copy link

Module version(s) affected

6.1.3

Description

I want to be able to setup a workflow but not add Notification Email details, submitting request for approval with no errors.

How to reproduce

Steps to reproduce

  • Login as Admin (with valid email)
  • Create a workflow
  • Add yourself as the Approver.
  • Leave Notification Email blank
image-20240125-235942
  • Save workflow
  • Go to a page and add workflow to page.
  • Make a edit to the page
  • Select Save
  • Select Apply for approval

Actual Results

  • If you leave Notifications Email blank → Error display. You have to then refresh page for the Workflow options to display
  • If you add Notification Email details the workflow is successful with no errors.

Example:

Please review content change to $Context.Title

$Initiator.Email

Link to review:
{$Context.AbsoluteEditLink}

1dadf75e-a629-4a3d-94fc-60729d72973c

Possible Solution

No response

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
@GuySartorelli
Copy link
Collaborator

Thanks for reporting this.

At the very least this should give better error feedback than just "error".

  • If the currently functionality does explicitly require setting up the email settings, then not setting that up should trigger validation errors so you can't get into the error state in the first place.
  • If it is valid to have workflows with no email settings configured, then whatever's causing the error needs to stop causing the error. I haven't looked at the code but my gut says it's probably trying to send an email even though you haven't told it who to send to, which would definitely cause an error.

If you're still open to working on a PR for this that would be great! I'm happy to provide any support you need for that.

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

No branches or pull requests

2 participants