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

CannotResolveClassException if jobfilters with regex is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Jenkins ver. 2.117
      Job DSL 1.69
      View Job Filters 1.27
      java version "1.8.0_121"

      I try to use the following DSL to create a view with a jobfilter

      listView('Test') {
          columns {
              status()
              weather()
              name()
              cronTrigger()
              lastSuccess()
              lastFailure()
              lastDuration()
              buildButton()
          }
            jobFilters {
              regex {
                  matchType(MatchType.INCLUDE_MATCHED)
                  matchValue(RegexMatchValue.EMAIL)
                  regex('.*loremipsum.*')
              }
          }
      }

      The Job runs without any problems, but I get an old data warning with the following warning:

      Type                  Name  Error
      hudson.model.ListView Test  CannotResolveClassException: hudson.views.RegExJobFilter

      Also the view jobFilters in the jenkins config.xml is empty.

      If I create a view manually with this filter conditions it works and looks in the config like the following

      <jobFilters>
      <hudson.views.RegExJobFilter plugin="view-job-filters@1.27">
      <includeExcludeTypeString>includeMatched</includeExcludeTypeString>
      <valueTypeString>EMAIL</valueTypeString>
      <regex>.*loremipsum.*</regex>
      </hudson.views.RegExJobFilter>
      </jobFilters>

       

            daspilker Daniel Spilker
            juergen_thomann Jürgen Thomann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: