-
Bug
-
Resolution: Fixed
-
Minor
-
None
After a restart the Last changes history becomes empty. This is explained by following comment on JENKINS-49368:
https://github.com/jenkinsci/last-changes-plugin/commit/0cb6083a31b207099c5400e4f4a93bee8510f3a5 will not work correctly after the Jenkins restart. The class has no readResolve() resolution, so the value will be null when you save new jobs and reload them from the disk. It will cause NPEs in methods like getLastChangesBuilds().
getLastChangesBuilds() is what we use to create the history page.
Note that after a job run the history is restored.
Hi oleg_nenashev,
For fixing
JENKINS-49368we had to make the job instance variable transient and now users are facing an NPE as you predicted.You've suggested:
Can you point me to an example on how I could achieve that? I've read https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility but could not figure it out on how I would change getJob() in order to restore it.
Thanks in advance!