Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-19448

VersionCheck code may have it round the wrong way - minimum version should be checked

    XMLWordPrintable

Details

    Description

      The charting plugin 1.5 says its MAX version is 4.0

      But the VersionCheck code does this

       final Set<Plugin> outdatedPlugins = new HashSet<Plugin>();
              for (String pluginKey : pluginsToCheck)
              {
                  final Plugin plugin = pluginAccessor.getPlugin(pluginKey);
                  //looks like the plugin isn't installed.
                  if (plugin == null)
                  {
                      continue;
                  }
                  final VersionNumber maxVersion = new VersionNumber(Float.toString(plugin.getPluginInformation().getMaxVersion()));
                  final VersionNumber appVersion = new VersionNumber(getVersionStringWithoutSuffix());
                  //now if the plugin's maxVersion is less than to the current app version, this plugin needs to be updated. 
                  if (maxVersion.isLessThan(appVersion))
                  {
                      outdatedPlugins.add(plugin);
                  }
              }
      

      And hence the charting plugin wont run on 4.0.1 or above. Is this intended. Shouldnt the check be for MIN version?

      A comment in the code seems to think so

      Checks a certain subset of plugins installed, to ensure that their minVersion is greater or equal to the current
       * application version.
      

      Attachments

        Activity

          People

            andreask@atlassian.com Andreas Knecht (Inactive)
            bbaker ɹǝʞɐq pɐɹq
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: