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

Calendar day constants not allowed in pipeline scripts

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            PR up adding the days of the week and the months as well at https://github.com/jenkinsci/script-security-plugin/pull/210

            Show
            abayer Andrew Bayer added a comment - PR up adding the days of the week and the months as well at https://github.com/jenkinsci/script-security-plugin/pull/210
            Hide
            abayer Andrew Bayer added a comment -

            This'll be in the next release (1.45)

            Show
            abayer Andrew Bayer added a comment - This'll be in the next release (1.45)

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: