If using a polling build filter anything inside the filter will not trigger a build.Â
The next time a poll detects changes outside the filter the job runs and reports all changelists since the last job execution including the changes that were filtered.
Â
For example in the following screenshot 'abc.txt' was in the polling build filter but when a file that triggers the job runs every changelist since the last build is displayed:
Â

I would expect that only changelist 673 was displayed.
Â
Reproduction steps:
(1) Add a stream called //streams/main
(2) Add two files to the stream called //streams/main/abc.txt and //streams/main/def.txt
(3) Create a pipleine job with the following definition (change 'credential' to match a valid Perforce credential):
pipeline {Â
  agent any
   triggers {
    pollSCM('H 0-15/3 * * H(1-5)')
      }
  stages {Â
    stage("Repro") {Â
      steps {
          checkout perforce(credential: 'JenkinsMaster', filter: [pathFilter('//streams/main/abc.txt')], populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), workspace: streamSpec(charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, streamName: '//streams/main'))
      }
    }
  }
}
(4) Build the job.
(5) Edit and submit //streams/main/abc.txtÂ
(6) Run poll on the job (needs the Poll Now plugin). The job does not run.
(7) Edit and submit //streams/main/abc.txtÂ
(8) Run poll on the job (needs the Poll Now plugin). The job does not run.
(9) Edit and submit //streams/main/def.txt
(10) Run poll on the job (needs the Poll Now plugin). The job will run and report 3 changelists.
Expected Behavior - Only the changelist for step (9) should be reported.
Â