Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-13630

scheduleTask does not validate required fields

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.4.0
    • Fix Version/s: None
    • Component/s: Scheduled Tasks, Scripting
    • Labels:
      None
    • Story Points:
      2

      Description

      Tested schedule backup task creation via groovy script. The script runs successfully regardless if required items are missing. In this case location and node id were omitted.

      Code snippet:

      // build and schedule task
      TaskConfiguration config = scheduler.createTaskConfigurationInstance(typeId)
      config.enabled = jobEnabled
      config.name = jobName
      //config.alertEmail = task.email
      //config.setString("location", task.location)
      //config.setString("limitnode", currentNodeId)
      TaskInfo taskInfo = scheduler.scheduleTask(config, scheduler.scheduleFactory.hourly(currentDate))
      

       Returns 200/OK :

      < HTTP/1.1 200 OK
      < Date: Mon, 10 Jul 2017 21:08:53 GMT
      < Server: Nexus/3.4.0-02 (PRO)
      < X-Frame-Options: SAMEORIGIN
      < X-Content-Type-Options: nosniff
      < Content-Type: application/json
      < Content-Length: 954
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rbriganti Rick Briganti
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title