Problem/Motivation

As i worked on Issue 3394957 I recognized, that the form fields for the stop condition of the scheduled newsletter could be improved.
- the maximum number of editions is not a number form field
- the maximum number of editions is not required (when stoptype is 2)
- the stop date is not required (when stoptype is 1)

Steps to reproduce

Go to scheduler tab of a newsletter edition which is a template and play around with the stop condition fields.

Proposed resolution

I propose ...

  1. to switch the field widget for the maximum number of editions to 'number' and set min value zu zero
  2. set a required condition for the maximum number of editions to be required when the stoptype is 2
  3. set a required condition for the stop date form field to be required when the stoptype is 1

Because of a core bug with the date time field, we might need a validate function for step 3. See

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jocowood created an issue. See original summary.

jocowood’s picture

Status: Active » Needs review

Manual tests looking good, pipelines are happy, moving forward to "needs review"

goldfit’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed the changes and have no complaints.

  • jocowood committed dd1ac200 on 4.x
    Issue #3523573 by JoCowood: Improved stop condition form fields and...
jocowood’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.