Project

General

Profile

Defect #30718 » 0001-Fix-30718.patch

Marius BĂLTEANU, 2019-02-14 22:52

View differences:

app/models/project.rb
24 24
  STATUS_CLOSED     = 5
25 25
  STATUS_ARCHIVED   = 9
26 26

  
27
  LABEL_BY_STATUS = {
28
    1 => l(:project_status_active),
29
    5 => l(:project_status_closed),
30
    9 => l(:project_status_archived),
31
  }
32

  
33 27
  # Maximum length for project identifiers
34 28
  IDENTIFIER_MAX_LENGTH = 100
35 29

  
app/models/query.rb
604 604

  
605 605
  # Returns a scope of project statuses that are available as columns or filters
606 606
  def project_statuses_values
607
    project_statuses =  Project::LABEL_BY_STATUS
608
    # Remove archived status from filters
609
    project_statuses.delete(9)
610
    project_statuses.stringify_keys.invert.to_a
607
    [
608
      [l(:project_status_active), "#{Project::STATUS_ACTIVE}"],
609
      [l(:project_status_closed), "#{Project::STATUS_CLOSED}"]
610
    ]
611 611
  end
612 612

  
613 613
  # Adds available filters
(3-3/4)