Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f1e3dba7
Commit
f1e3dba7
authored
Jun 11, 2020
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change health status constants to use 0
When the health status is set as 'No status' the input value will be 0.
parent
dcce0164
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
app/assets/javascripts/issuable_bulk_update_actions.js
app/assets/javascripts/issuable_bulk_update_actions.js
+1
-3
ee/app/assets/javascripts/sidebar/constants.js
ee/app/assets/javascripts/sidebar/constants.js
+1
-1
ee/spec/services/ee/issuable/bulk_update_service_spec.rb
ee/spec/services/ee/issuable/bulk_update_service_spec.rb
+13
-0
No files found.
app/assets/javascripts/issuable_bulk_update_actions.js
View file @
f1e3dba7
...
...
@@ -79,8 +79,6 @@ export default {
*/
getFormDataAsObject
()
{
const
healthStatusValue
=
this
.
form
.
find
(
'
input[name="update[health_status]"]
'
).
val
();
const
formData
=
{
update
:
{
state_event
:
this
.
form
.
find
(
'
input[name="update[state_event]"]
'
).
val
(),
...
...
@@ -88,7 +86,7 @@ export default {
milestone_id
:
this
.
form
.
find
(
'
input[name="update[milestone_id]"]
'
).
val
(),
issuable_ids
:
this
.
form
.
find
(
'
input[name="update[issuable_ids]"]
'
).
val
(),
subscription_event
:
this
.
form
.
find
(
'
input[name="update[subscription_event]"]
'
).
val
(),
health_status
:
healthStatusValue
===
'
null
'
?
'
0
'
:
healthStatusValue
,
health_status
:
this
.
form
.
find
(
'
input[name="update[health_status]"]
'
).
val
()
,
add_label_ids
:
[],
remove_label_ids
:
[],
},
...
...
ee/app/assets/javascripts/sidebar/constants.js
View file @
f1e3dba7
...
...
@@ -20,7 +20,7 @@ export const iterationSelectTextMap = {
};
export
const
healthStatusForRestApi
=
{
NO_STATUS
:
null
,
NO_STATUS
:
'
0
'
,
[
healthStatus
.
ON_TRACK
]:
'
on_track
'
,
[
healthStatus
.
NEEDS_ATTENTION
]:
'
needs_attention
'
,
[
healthStatus
.
AT_RISK
]:
'
at_risk
'
,
...
...
ee/spec/services/ee/issuable/bulk_update_service_spec.rb
View file @
f1e3dba7
...
...
@@ -64,6 +64,19 @@ RSpec.describe Issuable::BulkUpdateService do
expect
(
issuable
.
health_status
).
to
eq
(
'on_track'
)
end
end
context
"when params values are '0'"
do
let
(
:params
)
{
{
issuable_ids:
issuables
.
map
(
&
:id
),
health_status:
'0'
}
}
it
'succeeds and remove values'
do
expect
(
subject
[
:success
]).
to
be_truthy
expect
(
subject
[
:count
]).
to
eq
(
issuables
.
count
)
issuables
.
each
do
|
issuable
|
issuable
.
reload
expect
(
issuable
.
health_status
).
to
be_nil
end
end
end
end
context
'when features are disabled'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment