To Recreate the problem:

a. if the user has the Dates filled in, "Repeat" checked, Repeats set to Weekly, and "Every _ weeks" is blank, then after Saving --- the Dates and Repeat values are blanked out.

b. if the user did everything correctly and "Every _ weeks" is filled in, Saves, then all is well. If the user goes back in and sets "Every _ weeks" is blank, then the Dates and Repeat values are blanked out.

Comments

dev11235 created an issue. See original summary.

dev11235’s picture

Title: Date with empty 'Repeats # Weeks' validation problem » Date with empty 'Repeats # Weeks' and "Repeats Every # of Days" validation needed
dev11235’s picture

Here is m attempt at a fix, attached patch file.

dev11235’s picture

Assigned: dev11235 » Unassigned
damienmckenna’s picture

Version: 7.x-2.11-beta1 » 7.x-2.x-dev
Status: Active » Needs review

Thanks for reporting the bug and the patch, lets see what the testbot says.

Status: Needs review » Needs work

The last submitted patch, 3: 3022378-3-repeats-num-weeks-num-daily.patch, failed testing. View results

dev11235’s picture

Hmm, err... trying this patch...

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.15 KB

Thanks for reolling the patch. This fixes the paths, see https://www.drupal.org/patch/create for details.

Status: Needs review » Needs work

The last submitted patch, 8: date-n3022378-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joelpittet’s picture

@dev11235 a trick if you're creating the patch from git within the a whole website is use the --relative flag. The proper way would be to get the changes on the git repo for the project as @DamienMcKenna mentioned above but if you're on the dev branch already updated the git diff --relative > name.patch is easier from with the project directory.

Also, I've done that type of patch by accident a bunch of times! Still trying to catch myself, probably will do it again.

joelpittet’s picture

@dev11235, the automated tests are showing a failure when INTERVAL key doesn't exist.

Undefined index: INTERVAL

joelpittet’s picture

Issue tags: +Needs reroll

Looks like this needs a minor re-roll as well because of some single quote string changes in another patch.

dev11235’s picture

StatusFileSize
new1.43 KB

Thanks for the tips @DamienMcKenna and @joelpittet.

dev11235’s picture

StatusFileSize
new1.36 KB

Oops, this one is more correct
Rerolled. +5 exp. Level up!

dev11235’s picture

StatusFileSize
new1.35 KB

more coffee needed

dev11235’s picture

StatusFileSize
new1.28 KB

ugh, not sure why the patch has indentation, fixed indentation

dev11235’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
joelpittet’s picture

Priority: Minor » Normal
Status: Needs review » Reviewed & tested by the community

This looks great, I could see maybe just doing an !empty() but it would limit other values that "falsey", so this isset() is probably the way to go.

Moving this to a normal issue priority because it's a bug. Minor is more like typos or micro-optimizations.

  • DamienMcKenna committed ffdf64f on 7.x-2.x authored by dev11235
    Issue #3022378 by dev11235, DamienMcKenna, joelpittet: Date with empty "...
damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #2867810: Plan for Date 7.x-2.11 release

Thanks. Committed.

Status: Fixed » Closed (fixed)

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