Navigation Menu

Skip to content

Commit

Permalink
fix issue with multiple issue transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
zegenie committed Sep 17, 2018
1 parent 53f5d03 commit 2b83cea
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/modules/main/Components.php
Expand Up @@ -11,6 +11,7 @@
* Main action components
*
* @property entities\Issue $issue The issue
* @property entities\WorkflowTransition $transition
*
*/
class Components extends framework\ActionComponent
Expand Down Expand Up @@ -210,6 +211,19 @@ protected function setupVariables()
$fields_list['severity']['choices'] = entities\Severity::getAll();
$fields_list['milestone'] = array();
$fields_list['milestone']['choices'] = $this->project->getMilestonesForIssues();

if (isset($this->issues)) {
$all_statuses = [];
$project_statuses = $this->project->getAvailableStatuses();
foreach ($this->issues as $issue) {
$statuses = ($this->project->isFreelancingAllowed()) ? $project_statuses : $issue->getAvailableStatuses();
foreach ($statuses as $status_id => $status) {
$all_statuses[$status_id] = $status;
}
}
$this->statuses = $all_statuses;
}

}

$this->fields_list = $fields_list;
Expand Down

0 comments on commit 2b83cea

Please sign in to comment.