diff --git a/CHANGELOG.md b/CHANGELOG.md index be037c328..fb76f358a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fixed bug that disallowed empty label values ([#655](https://github.com/opendevstack/ods-jenkins-shared-library/pull/655)) - Added builder (agent and master) labels into image building process ([#644](https://github.com/opendevstack/ods-jenkins-shared-library/pull/644)) - Added regexp compatibility with new Bitbucket merge commit messages ([#655](https://github.com/opendevstack/ods-jenkins-shared-library/pull/656)) +- Remove the workaround for NPE resolving issues ([#660](https://github.com/opendevstack/ods-jenkins-shared-library/pull/660)) - Set jenkins job to unstable in case of open issues ([#664](https://github.com/opendevstack/ods-jenkins-shared-library/pull/664)) - Fixed regression on project dump in release manager ([#666](https://github.com/opendevstack/ods-jenkins-shared-library/issues/666)) - Fixed use of full image in the creation of the documents ([682](https://github.com/opendevstack/ods-jenkins-shared-library/pull/682)) diff --git a/src/org/ods/orchestration/util/Project.groovy b/src/org/ods/orchestration/util/Project.groovy index 21b326641..b6fc6b5f2 100644 --- a/src/org/ods/orchestration/util/Project.groovy +++ b/src/org/ods/orchestration/util/Project.groovy @@ -1146,34 +1146,6 @@ class Project { protected Map loadJiraDataForCurrentVersion(String projectKey, String versionName) { def result = [:] def newData = this.loadVersionJiraData(projectKey, versionName) - /* FIXME: This is a workaround for NPE bugs resulting from being unable to resolve a reference to an issue belonging - * to a previous version. As a workaround, the deltadocgen report contains the full information of all references. - * Here we will strip data information and store it aside for the use of the resolution algorithm. - * The NPE's must be fixed in the future, and this workaround and the deltadocgen report workaround have to be - * rolled back. */ - // FIXME: Start of the workaround - def typesOfInterest = [ - JiraDataItem.TYPE_EPICS, - JiraDataItem.TYPE_REQUIREMENTS, - JiraDataItem.TYPE_TECHSPECS, - JiraDataItem.TYPE_RISKS, - JiraDataItem.TYPE_MITIGATIONS, - JiraDataItem.TYPE_TESTS - ] as Set - def olderIssues = [:] - newData = newData.collectEntries { - type, issues -> - if (typesOfInterest.contains(type)) { - olderIssues.putAll(issues) - def filteredIssues = issues.findAll { - key, Map issue -> issue.versions[0] == versionName - } - return [(type): filteredIssues] - } - return [(type): issues] - } - result.olderIssues = olderIssues - // FIXME: End of the workaround. // Get more info of the versions from Jira def predecessors = newData.precedingVersions ?: [] @@ -1466,13 +1438,7 @@ class Project { result[type][key][referenceType] = [] item[referenceType].eachWithIndex { referenceKey, index -> - /* FIXME: This is a workaround for NPE bugs resulting from being unable to resolve a reference to an issue belonging - * to a previous version. As a workaround, the deltadocgen report contains the full information of all references. - * Here, whenever an issue cannot be resolved, we use an auxiliar olderIssues map - * containing the referenced issues belonging to previous versions. - * The NPE's must be fixed in the future, and this workaround and the deltadocgen report workaround have to be - * rolled back. */ - result[type][key][referenceType][index] = data[referenceType][referenceKey]?:data.olderIssues[referenceKey] + result[type][key][referenceType][index] = data[referenceType][referenceKey] } } }