Skip to content

Commit

Permalink
Check if protected status array is empty, else use dummy value
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvijge committed Mar 15, 2017
1 parent 71a7402 commit d96b804
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/issue_status_changer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def self.issue_change_state(state)
test = "<"
status_message = settings['status_message_open']
end
protected_status = settings[:new_status]['protected_status'][tracker].join(",")
protected_trackers = settings[:new_status]['protected_status'][tracker] || ['999']
protected_status = protected_trackers.join(",")

Issue.where("done_ratio#{test}100 AND tracker_id=#{tracker} AND status_id IN (#{change_state}) AND status_id NOT IN (#{protected_status}) AND id IN (SELECT parent_id FROM issues)").each do |issue|
i = Issue.find issue.id
Expand Down

0 comments on commit d96b804

Please sign in to comment.