After branch-api version 2.5.5 was released, this change was introduced https://issues.jenkins-ci.org/browse/JENKINS-39682.
Now every-time a XML for a job changes it triggers a re-build of the job. There are a few problems with this. First, I use Bitbucket cloud which has API limits and I have hundreds of jobs in Jenkins. If they all keep triggering scans it breaks everything as the API limits can't are exceeded.
I have made it in a way that the job XMLs themselves very rarely change. They will only change once in a few months if we decide to add a new trait etc... So that part is ok. But, all those hundreds of jobs leave inside folders.
If the XML of folder change, all jobs inside will trigger scans as well. I don't see a reason for this. I believe it would be beneficial to try to avoid triggering re-scans for child items if the parent changes.
My folders themselves don't rarely change as well. The problem is that we have views inside the folders, and those are making it trigger the child jobs on EVERY seed job run.
Consider this code:
This somehow makes it trigger on every run. The XML of the folder does not actually change, but it trigger scans on every child item anyway.
Also, considering that a view CAN change often, triggering the child items for this is not a good idea.
I was hoping this re-scanning could be avoided all together, but if has to stay, at least that folders could behave better and not trigger the child items.