Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20173

"Scheduled Run Date" can't be set when creating new scheduled job

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.16
    • Fix Version/s: 4.7.19
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      To reproduce:

      • visit civicrm/admin/job?action=add&reset=1, enter a time, and submit the form
      • inspect the database and find that the field is NULL

      The cause:
      Timestamp fields are explicitly excluded from $dao->save() operations.

      The conservative fix:
      Update CRM/Admin/Form/Job.php. Execute a second query (not using $dao->save()) to save the timestamp after the initial insert. (Actually, there is too much business logic in this form. That logic should be moved to a BAO and the fix should be made there, thinning out the form layer.)

      The fix that seems more right but which will probably break a bunch of stuff:
      How arbitrary that timestamps can't be saved via the DAO! Not all timestamp fields are "on update CURRENT_TIMESTAMP" fields. Strip that junk out!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pittstains Frank J. Gómez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: