Skip to content
Snippets Groups Projects

Todos sorting dropdown

Merged Felipe Artur requested to merge issue_18135 into master
1 unresolved thread

Implements #18135 (closed)

todos_sorting

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
  • Felipe Artur Added 781 commits:

    Added 781 commits:

  • Author Maintainer

    Instead of todos.created_at i will use todos.id

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Felipe Artur Added 114 commits:

    Added 114 commits:

  • Felipe Artur Added 12 commits:

    Added 12 commits:

  • Felipe Artur Added 72 commits:

    Added 72 commits:

  • Reassigned to @rymai

  • Author Maintainer

    @rymai Can you review please?

  • Felipe Artur Added ~149423 label

    Added ~149423 label

  • Felipe Artur Milestone changed to %8.11

    Milestone changed to %8.11

  • Felipe Artur Marked the task Conform by the style guides as completed

    Marked the task Conform by the style guides as completed

  • Reassigned to @DouweM

  • Douwe Maan
  • Douwe Maan
  • Reassigned to @felipe_artur

  • Reassigned to @rspeicher

  • Reassigned to @DouweM

  • Robert Speicher
  • Reassigned to @rspeicher

  • Reassigned to @felipe_artur

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • 41 43
    42 44 after_save :keep_around_commit
    43 45
    46 class << self
    47 def sort(method)
    48 method == "priority" ? order_by_labels_priority : order_by(method)
    49 end
    50
    51 # Order by priority depending on which issue/merge request the Todo belongs to
    52 # Todos with highest priority first then oldest todos
    53 def order_by_labels_priority
    54 select('todos.*').from('todos').
    55 joins('LEFT JOIN label_links ON (todos.target_id = label_links.target_id AND label_links.target_type = todos.target_type)').
    56 joins('LEFT JOIN labels ON label_links.label_id = labels.id').
    57 order(Gitlab::Database.nulls_last_order('labels.priority', 'ASC')).
  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Reassigned to @DouweM

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Douwe Maan
  • Douwe Maan
  • Reassigned to @felipe_artur

  • Reassigned to @DouweM

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Felipe Artur Added 1 commit:

    Added 1 commit:

  • Douwe Maan Status changed to merged

    Status changed to merged

  • Douwe Maan mentioned in commit c620c405

    mentioned in commit c620c405

  • Picked into 8-11-stable, will go into 8.11.0-rc6.

  • Rubén Dávila Removed ~149423 label

    Removed ~149423 label

  • Douwe Maan mentioned in commit be294efd

    mentioned in commit be294efd

  • Please register or sign in to reply
    Loading