We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea419a3 commit 69bba9fCopy full SHA for 69bba9f
pkg/models/priority.go
@@ -17,13 +17,13 @@ const (
17
var priorityToInt = map[string]int{
18
PriorityUnknown: 0,
19
PriorityInformational: 1,
20
- PriorityImportant: 4,
21
- PriorityUrgent: 5,
+ PriorityImportant: 3,
+ PriorityUrgent: 4,
22
23
// To be deprecated
24
PriorityNegligible: 1,
25
- PriorityLow: 2,
26
- PriorityMedium: 3,
+ PriorityLow: 1,
+ PriorityMedium: 2,
27
}
28
29
func ComparePriority(priority1, priority2 string) int {
pkg/models/priority_test.go
@@ -24,6 +24,32 @@ func TestComparePriority(t *testing.T) {
{"NONE", "UNKNOWN", 0},
{"UNKNOWN", "", 0},
{"", "UNKNOWN", 0},
+
+ // To be deprecated, for backwards compatibility
+ {"NEGIGIBLE", "URGENT", -1},
30
+ {"NEGIGIBLE", "IMPORTANT", -1},
31
+ {"NEGIGIBLE", "INFORMATIONAL", 0},
32
+ {"NEGIGIBLE", "UNKNOWN", 1},
33
+ {"NEGIGIBLE", "NONE", 1},
34
+ {"NEGIGIBLE", "", 1},
35
+ {"", "NEGIGIBLE", -1},
36
+ {"NEGIGIBLE", "NEGIGIBLE", 0},
37
+ {"LOW", "URGENT", -1},
38
+ {"LOW", "IMPORTANT", -1},
39
+ {"LOW", "INFORMATIONAL", 0},
40
+ {"LOW", "UNKNOWN", 1},
41
+ {"LOW", "NONE", 1},
42
+ {"LOW", "", 1},
43
+ {"", "LOW", -1},
44
+ {"LOW", "LOW", 0},
45
+ {"MEDIUM", "URGENT", -1},
46
+ {"MEDIUM", "IMPORTANT", -1},
47
+ {"MEDIUM", "INFORMATIONAL", 1},
48
+ {"MEDIUM", "UNKNOWN", 1},
49
+ {"MEDIUM", "NONE", 1},
50
+ {"MEDIUM", "", 1},
51
+ {"", "MEDIUM", -1},
52
+ {"MEDIUM", "MEDIUM", 0},
53
54
55
for _, test := range tests {
0 commit comments