code: public boolean isUpgradedFromBefore(VersionNumber v) {
          try {
              return new VersionNumber(version).isOlderThan(v);
          } catch (IllegalArgumentException e) {
              // fail to parse this version number
              return false;
          }
      }
docs: Returns true if the current running Jenkins is upgraded from a version earlier than the specified version.
  
  <p>
  This method continues to return true until the system configuration is saved, at which point
  {@link #version} will be overwritten and Jenkins forgets the upgrade history.
  
  <p>
  To handle SNAPSHOTS correctly, pass in "1.N.*" to test if it's upgrading from the version
  equal or younger than N. So say if you implement a feature in 1.301 and you want to check
  if the installation upgraded from pre-1.301, pass in "1.300.*"
  
  @since 1.301