aboutsummaryrefslogtreecommitdiffstats
path: root/modules/issue
diff options
context:
space:
mode:
Diffstat (limited to 'modules/issue')
-rw-r--r--modules/issue/template/template.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/issue/template/template.go b/modules/issue/template/template.go
index 84ae90e4ed..192aaf8e01 100644
--- a/modules/issue/template/template.go
+++ b/modules/issue/template/template.go
@@ -8,6 +8,7 @@ import (
"fmt"
"net/url"
"regexp"
+ "slices"
"strconv"
"strings"
@@ -447,12 +448,7 @@ func (o *valuedOption) IsChecked() bool {
case api.IssueFormFieldTypeDropdown:
checks := strings.Split(o.field.Get("form-field-"+o.field.ID), ",")
idx := strconv.Itoa(o.index)
- for _, v := range checks {
- if v == idx {
- return true
- }
- }
- return false
+ return slices.Contains(checks, idx)
case api.IssueFormFieldTypeCheckboxes:
return o.field.Get(fmt.Sprintf("form-field-%s-%d", o.field.ID, o.index)) == "on"
}
/option> Mirror of Apache POI: https://github.com/apache/poiwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/sonar/ooxml-schema-encryption/pom.xml
blob: 56d297677592a1ef8282686a0455c149064965ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107