Skip to content
Snippets Groups Projects

Refactor issuable description and metadata form sections

3 unresolved threads

Continuation of https://gitlab.com/gitlab-org/gitlab-ce/issues/23864.

Brother of gitlab-org/gitlab-ce!7758.

Todo:

  • Weight selection seems to be broken when creating an issue

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
158 158 options_from_collection_for_select(options, 'name', 'title', params[:due_date])
159 159 end
160 160
161 def issues_weight_options(selected = nil, edit: false)
162 weights = edit ? edit_weights : issue_weights
163
164 options_for_select(weights, selected || params[:weight])
165 end
166
167 def issue_weights(weight_array = Issue.weight_options)
168 weight_array.zip(weight_array)
169 end
170
171 def edit_weights
172 issue_weights([Issue::WEIGHT_NONE] + Issue::WEIGHT_RANGE.to_a)
173 end
  • 168 168 - else
    169 169 .light None
    170 170 .selectbox.hide-collapsed
    171 = dropdown_tag("Weight", options: { title: "Change weight", toggle_class: 'js-weight-select', dropdown_class: "dropdown-menu-selectable",
    172 placeholder: "Search weight", data: { field_name: "weight", issue_update: "#{issuable_json_path(issuable)}", ability_name: "#{issuable.to_ability_name}" } }) do
    171 = weight_dropdown_tag(issuable, title: 'Change weight', data: { field_name: 'weight', issue_update: "#{issuable_json_path(issuable)}", ability_name: "#{issuable.to_ability_name}" }) do
    173 172 %ul
    174 - Issue.weight_options.select{|weight| weight != "Everything" && weight != "Any Weight"}.each do |weight|
  • 229 229 end
    230 230 end
    231 231
    232 def self.weight_filter_options
    233 weight_options + [WEIGHT_ALL, WEIGHT_ANY]
    234 end
    235
    232 236 def self.weight_options
    233 [WEIGHT_ALL, WEIGHT_ANY, WEIGHT_NONE] + WEIGHT_RANGE.to_a
    237 [WEIGHT_NONE] + WEIGHT_RANGE.to_a
    234 238 end
  • username-removed-128633 Marked the task Weight selection seems to be broken when creating an issue as completed

    Marked the task Weight selection seems to be broken when creating an issue as completed

  • Added 1 commit:

    • c49d5673 - Refactor issuable description and metadata form sections

    Compare with previous version

  • username-removed-128633 Unmarked this merge request as a Work In Progress

    Unmarked this merge request as a Work In Progress

  • Robert Speicher Enabled an automatic merge when the build for c49d5673 succeeds

    Enabled an automatic merge when the build for c49d5673 succeeds

  • Robert Speicher Mentioned in commit 1c66e080

    Mentioned in commit 1c66e080

  • Robert Speicher Status changed to merged

    Status changed to merged

  • Please register or sign in to reply
    Loading