voxpupuli / puppet-jira

Atlassian JIRA Puppet Module
https://forge.puppet.com/puppet/jira
Apache License 2.0
61 stars 143 forks source link

Extend the version check to the tailored jira servicedesk version #383

Closed diLLec closed 3 years ago

diLLec commented 3 years ago

Pull Request (PR) description

The current version check does not take the JIRA servicedesk package into account. This package has an other versioning schema - see here: https://www.atlassian.com/de/software/jira/service-management/download-archives

This Pull Request (PR) fixes the following issues

Currently, if the following parameters are choosen to init the jira class, the output shows

JIRA versions older than 8.0.0 are no longer supported. Please use an older version of this module to upgrade first

class { 'jira':
    #
    # JIRA parameters
    version   => '4.17.0',
    product  => 'servicedesk',
...
oranenj commented 3 years ago

@diLLec the change breaks if someone is installing "jira-core". I confess I don't know if that's even a valid option anymore, but you need to add it to the enum or return it to a string and then fix the version comparison logic to take that into account.

diLLec commented 3 years ago

Thanks @oranenj - I've added that option and the tests seam to be succeeding now.

oranenj commented 3 years ago

@diLLec you don't need to check for "jira" in the conditional. Doing that changes behaviour for jira-core since previously the version check was for any software.

I think in order for this not to be a breaking change you need to check for != "servicedesk". Strictly speaking making the String into an Enum is a breaking change too, but if all actually existing choices are enumerated then it should be fine. (there's jira, jira-core and servicedesk, but is that all?)

oranenj commented 3 years ago

I made the changes directly from Github, I think this should be good enough to fix the issue and not break API.