[WEB-2518] chore: Reverse order by of priority keys (#5591)
* make front end changes for priority orderby reversal * chore: handled priority ordering in issues pagination --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
parent
a05876552c
commit
ae1a63f832
4 changed files with 16 additions and 16 deletions
|
|
@ -95,7 +95,7 @@ export const ISSUE_ORDER_BY_OPTIONS: {
|
|||
{ key: "-updated_at", title: "Last Updated" },
|
||||
{ key: "start_date", title: "Start Date" },
|
||||
{ key: "target_date", title: "Due Date" },
|
||||
{ key: "priority", title: "Priority" },
|
||||
{ key: "-priority", title: "Priority" },
|
||||
];
|
||||
|
||||
export const ISSUE_FILTER_OPTIONS: {
|
||||
|
|
@ -208,7 +208,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "priority", "project", "labels", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -221,7 +221,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "priority", "project", "labels"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -257,7 +257,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
"created_by",
|
||||
null,
|
||||
],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -272,7 +272,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "cycle", "module", "priority", "project", "labels", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -285,7 +285,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state_detail.group", "cycle", "module", "priority", "project", "labels"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -357,7 +357,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
group_by: ["state", "priority", "cycle", "module", "labels", "assignees", "created_by", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -383,7 +383,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
display_filters: {
|
||||
group_by: ["state", "priority", "cycle", "module", "labels", "assignees", "created_by"],
|
||||
sub_group_by: ["state", "priority", "cycle", "module", "labels", "assignees", "created_by", null],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority", "target_date"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority", "target_date"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -429,7 +429,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
],
|
||||
display_properties: ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
display_filters: {
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
@ -453,7 +453,7 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: {
|
|||
],
|
||||
display_properties: ["key", "issue_type"],
|
||||
display_filters: {
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "priority"],
|
||||
order_by: ["sort_order", "-created_at", "-updated_at", "start_date", "-priority"],
|
||||
type: [null, "active", "backlog"],
|
||||
},
|
||||
extra_options: {
|
||||
|
|
|
|||
|
|
@ -115,9 +115,9 @@ export const SPREADSHEET_PROPERTY_DETAILS: {
|
|||
},
|
||||
priority: {
|
||||
title: "Priority",
|
||||
ascendingOrderKey: "-priority",
|
||||
ascendingOrderKey: "priority",
|
||||
ascendingOrderTitle: "None",
|
||||
descendingOrderKey: "priority",
|
||||
descendingOrderKey: "-priority",
|
||||
descendingOrderTitle: "Urgent",
|
||||
icon: Signal,
|
||||
Column: SpreadsheetPriorityColumn,
|
||||
|
|
|
|||
|
|
@ -1744,11 +1744,11 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
|
|||
);
|
||||
|
||||
// custom
|
||||
case "priority": {
|
||||
case "-priority": {
|
||||
const sortArray = ISSUE_PRIORITIES.map((i) => i.key);
|
||||
return getIssueIds(orderBy(array, (currentIssue: TIssue) => indexOf(sortArray, currentIssue?.priority)));
|
||||
}
|
||||
case "-priority": {
|
||||
case "priority": {
|
||||
const sortArray = ISSUE_PRIORITIES.map((i) => i.key);
|
||||
return getIssueIds(
|
||||
orderBy(array, (currentIssue: TIssue) => indexOf(sortArray, currentIssue?.priority), ["desc"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue