Skip "Won't Do" issues from changelog
[MAILPOET-1867]
This commit is contained in:
committed by
Pavel Dohnal
parent
f10014d864
commit
7a8ba52b57
@ -50,7 +50,10 @@ class ChangelogController {
|
|||||||
private function renderList(array $issues, $field) {
|
private function renderList(array $issues, $field) {
|
||||||
$messages = [];
|
$messages = [];
|
||||||
foreach ($issues as $issue) {
|
foreach ($issues as $issue) {
|
||||||
if (!isset($issue['fields'][$field])) {
|
if (
|
||||||
|
!isset($issue['fields'][$field])
|
||||||
|
|| ($issue['fields']['resolution']['id'] === Jira::WONT_DO_RESOLUTION_ID)
|
||||||
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$messages[] = "* " . $this->sanitizePunctuation($issue['fields'][$field], ';');
|
$messages[] = "* " . $this->sanitizePunctuation($issue['fields'][$field], ';');
|
||||||
|
@ -7,6 +7,8 @@ class Jira {
|
|||||||
const CHANGELOG_FIELD_ID = 'customfield_10500';
|
const CHANGELOG_FIELD_ID = 'customfield_10500';
|
||||||
const RELEASENOTE_FIELD_ID = 'customfield_10504';
|
const RELEASENOTE_FIELD_ID = 'customfield_10504';
|
||||||
|
|
||||||
|
const WONT_DO_RESOLUTION_ID = '10001';
|
||||||
|
|
||||||
const PROJECT_MAILPOET = 'MAILPOET';
|
const PROJECT_MAILPOET = 'MAILPOET';
|
||||||
const PROJECT_PREMIUM = 'PREMIUM';
|
const PROJECT_PREMIUM = 'PREMIUM';
|
||||||
|
|
||||||
@ -60,7 +62,7 @@ class Jira {
|
|||||||
function getIssuesDataForVersion($version) {
|
function getIssuesDataForVersion($version) {
|
||||||
$changelog_id = self::CHANGELOG_FIELD_ID;
|
$changelog_id = self::CHANGELOG_FIELD_ID;
|
||||||
$release_note_id = self::RELEASENOTE_FIELD_ID;
|
$release_note_id = self::RELEASENOTE_FIELD_ID;
|
||||||
$issues_data = $this->search("fixVersion={$version['id']}", ['key', $changelog_id, $release_note_id, 'status']);
|
$issues_data = $this->search("fixVersion={$version['id']}", ['key', $changelog_id, $release_note_id, 'status', 'resolution']);
|
||||||
// Sort issues by importance of change (Added -> Updated -> Improved -> Changed -> Fixed -> Others)
|
// Sort issues by importance of change (Added -> Updated -> Improved -> Changed -> Fixed -> Others)
|
||||||
usort($issues_data['issues'], function($a, $b) use ($changelog_id) {
|
usort($issues_data['issues'], function($a, $b) use ($changelog_id) {
|
||||||
$order = array_flip(['added', 'updat', 'impro', 'chang', 'fixed']);
|
$order = array_flip(['added', 'updat', 'impro', 'chang', 'fixed']);
|
||||||
|
Reference in New Issue
Block a user