Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51332

Calendar day constants not allowed in pipeline scripts

      While trying to implement a day-of-week check in one of our pipelines, I ran across the following error:

      Scripts not permitted to use staticField java.util.Calendar TUESDAY
      

      Currently, you're allowed to use Calendar.getInstance().get(Calendar.DAY_OF_WEEK), but not the constants you need to interpret the result. This seems like an obvious accidental omission.

          [JENKINS-51332] Calendar day constants not allowed in pipeline scripts

          Moritz Baumann created issue -
          jang hyemi (Inactive) made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR #210 (Web Link)" [ 21277 ]
          Andrew Bayer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            abayer Andrew Bayer
            mb_o Moritz Baumann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: