jenkinsci/copyartifact-plugin — pull request #23 by ikedam (2013-07-27 08:38:01+00:00)
Title: [JENKINS-17680] Upgrade configurations from version 1.25

Upgrading CopyArtfifact from 1.25 or earlier to 1.26 or later causes job names to copy from get empty in job configuration pages.
Running a build upgrades the configuration, but the configuration breaks if one opens the configuration page and save it before running a build.

With this patch, configurations are upgraded when they are loaded.

This works as following:
* When a instance of CopyArtifact is unmarshalled, tests whether upgrade is needed.
* If any instance of CopyArtifact are needed to be upgrade, scan for all jobs and perform upgrade all CopyArtifact.

Points are:
* I did not persist the flag whether upgrading all CopyArtifact is done, for the case that a job with a old version of CopyArtifact configuration is recovered from a backup.
* I did not remove existing codes that upgrade configurations when running a build. There may be a case scanning for CopyArtifact fails. For example, CopyArtifact is wrapped by another Builder.