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
76f348d1
Commit
76f348d1
authored
Dec 13, 2021
by
Coung Ngo
Committed by
Illya Klymov
Dec 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix misspellings of issuable
parent
60f4f450
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
30 deletions
+30
-30
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_bulk_update_actions.js
...uable/bulk_update_sidebar/issuable_bulk_update_actions.js
+1
-1
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_bulk_update_sidebar.js
...uable/bulk_update_sidebar/issuable_bulk_update_sidebar.js
+4
-4
app/assets/javascripts/issuable/index.js
app/assets/javascripts/issuable/index.js
+1
-1
app/assets/javascripts/issues_list/components/issuables_list_app.vue
...javascripts/issues_list/components/issuables_list_app.vue
+4
-4
app/assets/javascripts/labels/labels_select.js
app/assets/javascripts/labels/labels_select.js
+1
-1
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+2
-2
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+1
-1
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+1
-1
ee/spec/helpers/notes_helper_spec.rb
ee/spec/helpers/notes_helper_spec.rb
+2
-2
spec/frontend/issues/show/issue_spec.js
spec/frontend/issues/show/issue_spec.js
+1
-1
spec/frontend/issues_list/components/issuables_list_app_spec.js
...rontend/issues_list/components/issuables_list_app_spec.js
+11
-11
spec/requests/api/todos_spec.rb
spec/requests/api/todos_spec.rb
+1
-1
No files found.
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_bulk_update_actions.js
View file @
76f348d1
...
...
@@ -115,7 +115,7 @@ export default {
});
// Add uniqueIds to add it as argument for _.intersection
labelIds
.
unshift
(
uniqueIds
);
// Return IDs that are present but not in all selected issu
e
ables
// Return IDs that are present but not in all selected issuables
return
uniqueIds
.
filter
((
x
)
=>
!
intersection
.
apply
(
this
,
labelIds
).
includes
(
x
));
},
...
...
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_bulk_update_sidebar.js
View file @
76f348d1
...
...
@@ -3,7 +3,7 @@
import
$
from
'
jquery
'
;
import
{
property
}
from
'
lodash
'
;
import
issu
e
ableEventHub
from
'
~/issues_list/eventhub
'
;
import
issuableEventHub
from
'
~/issues_list/eventhub
'
;
import
LabelsSelect
from
'
~/labels/labels_select
'
;
import
MilestoneSelect
from
'
~/milestones/milestone_select
'
;
import
initIssueStatusSelect
from
'
./init_issue_status_select
'
;
...
...
@@ -50,8 +50,8 @@ export default class IssuableBulkUpdateSidebar {
// The event hub connects this bulk update logic with `issues_list_app.vue`.
// We can remove it once we've refactored the issues list page bulk edit sidebar to Vue.
// https://gitlab.com/gitlab-org/gitlab/-/issues/325874
issu
e
ableEventHub
.
$on
(
'
issuables:enableBulkEdit
'
,
()
=>
this
.
toggleBulkEdit
(
null
,
true
));
issu
e
ableEventHub
.
$on
(
'
issuables:updateBulkEdit
'
,
()
=>
this
.
updateFormState
());
issuableEventHub
.
$on
(
'
issuables:enableBulkEdit
'
,
()
=>
this
.
toggleBulkEdit
(
null
,
true
));
issuableEventHub
.
$on
(
'
issuables:updateBulkEdit
'
,
()
=>
this
.
updateFormState
());
}
initDropdowns
()
{
...
...
@@ -110,7 +110,7 @@ export default class IssuableBulkUpdateSidebar {
toggleBulkEdit
(
e
,
enable
)
{
e
?.
preventDefault
();
issu
e
ableEventHub
.
$emit
(
'
issuables:toggleBulkEdit
'
,
enable
);
issuableEventHub
.
$emit
(
'
issuables:toggleBulkEdit
'
,
enable
);
this
.
toggleSidebarDisplay
(
enable
);
this
.
toggleBulkEditButtonDisabled
(
enable
);
...
...
app/assets/javascripts/issuable/index.js
View file @
76f348d1
...
...
@@ -56,7 +56,7 @@ export function initCsvImportExportButtons() {
export
function
initIssuableByEmail
()
{
Vue
.
use
(
GlToast
);
const
el
=
document
.
querySelector
(
'
.js-issu
e
able-by-email
'
);
const
el
=
document
.
querySelector
(
'
.js-issuable-by-email
'
);
if
(
!
el
)
return
null
;
...
...
app/assets/javascripts/issues_list/components/issuables_list_app.vue
View file @
76f348d1
...
...
@@ -21,7 +21,7 @@ import {
PAGE_SIZE_MANUAL
,
LOADING_LIST_ITEMS_LENGTH
,
}
from
'
../constants
'
;
import
issu
e
ableEventHub
from
'
../eventhub
'
;
import
issuableEventHub
from
'
../eventhub
'
;
import
{
emptyStateHelper
}
from
'
../service_desk_helper
'
;
import
Issuable
from
'
./issuable.vue
'
;
...
...
@@ -192,7 +192,7 @@ export default {
// We need to call nextTick here to wait for all of the boxes to be checked and rendered
// before we query the dom in issuable_bulk_update_actions.js.
this
.
$nextTick
(()
=>
{
issu
e
ableEventHub
.
$emit
(
'
issuables:updateBulkEdit
'
);
issuableEventHub
.
$emit
(
'
issuables:updateBulkEdit
'
);
});
},
issuables
()
{
...
...
@@ -203,7 +203,7 @@ export default {
},
mounted
()
{
if
(
this
.
canBulkEdit
)
{
this
.
unsubscribeToggleBulkEdit
=
issu
e
ableEventHub
.
$on
(
'
issuables:toggleBulkEdit
'
,
(
val
)
=>
{
this
.
unsubscribeToggleBulkEdit
=
issuableEventHub
.
$on
(
'
issuables:toggleBulkEdit
'
,
(
val
)
=>
{
this
.
isBulkEditing
=
val
;
});
}
...
...
@@ -211,7 +211,7 @@ export default {
},
beforeDestroy
()
{
// eslint-disable-next-line @gitlab/no-global-event-off
issu
e
ableEventHub
.
$off
(
'
issuables:toggleBulkEdit
'
);
issuableEventHub
.
$off
(
'
issuables:toggleBulkEdit
'
);
},
methods
:
{
isSelected
(
issuableId
)
{
...
...
app/assets/javascripts/labels/labels_select.js
View file @
76f348d1
...
...
@@ -101,7 +101,7 @@ export default class LabelsSelect {
if
(
IS_EE
)
{
/**
* For Scoped labels, the last label selected with the
* same key will be applied to the current issu
e
able.
* same key will be applied to the current issuable.
*
* If these are the labels - priority::1, priority::2; and if
* we apply them in the same order, only priority::2 will stick
...
...
app/controllers/projects/issues_controller.rb
View file @
76f348d1
...
...
@@ -10,7 +10,7 @@ class Projects::IssuesController < Projects::ApplicationController
include
RecordUserLastActivity
ISSUES_EXCEPT_ACTIONS
=
%i[index calendar new create bulk_update import_csv export_csv service_desk]
.
freeze
SET_ISSU
E
ABLES_INDEX_ONLY_ACTIONS
=
%i[index calendar service_desk]
.
freeze
SET_ISSUABLES_INDEX_ONLY_ACTIONS
=
%i[index calendar service_desk]
.
freeze
prepend_before_action
(
only:
[
:index
])
{
authenticate_sessionless_user!
(
:rss
)
}
prepend_before_action
(
only:
[
:calendar
])
{
authenticate_sessionless_user!
(
:ics
)
}
...
...
@@ -22,7 +22,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action
:issue
,
unless:
->
(
c
)
{
ISSUES_EXCEPT_ACTIONS
.
include?
(
c
.
action_name
.
to_sym
)
}
after_action
:log_issue_show
,
unless:
->
(
c
)
{
ISSUES_EXCEPT_ACTIONS
.
include?
(
c
.
action_name
.
to_sym
)
}
before_action
:set_issuables_index
,
if:
->
(
c
)
{
SET_ISSU
E
ABLES_INDEX_ONLY_ACTIONS
.
include?
(
c
.
action_name
.
to_sym
)
}
before_action
:set_issuables_index
,
if:
->
(
c
)
{
SET_ISSUABLES_INDEX_ONLY_ACTIONS
.
include?
(
c
.
action_name
.
to_sym
)
}
# Allow write(create) issue
before_action
:authorize_create_issue!
,
only:
[
:new
,
:create
]
...
...
app/views/projects/issues/index.html.haml
View file @
76f348d1
...
...
@@ -30,7 +30,7 @@
=
render
'issues'
-
if
new_issue_email
.gl-text-center.gl-pt-5.gl-pb-7
.js-issu
e
able-by-email
{
data:
{
initial_email:
new_issue_email
,
issuable_type:
issuable_type
,
emails_help_page_path:
help_page_path
(
'development/emails'
,
anchor:
'email-namespace'
),
quick_actions_help_path:
help_page_path
(
'user/project/quick_actions'
),
markdown_help_path:
help_page_path
(
'user/markdown'
),
reset_path:
new_issuable_address_project_path
(
@project
,
issuable_type:
issuable_type
)
}
}
.js-issuable-by-email
{
data:
{
initial_email:
new_issue_email
,
issuable_type:
issuable_type
,
emails_help_page_path:
help_page_path
(
'development/emails'
,
anchor:
'email-namespace'
),
quick_actions_help_path:
help_page_path
(
'user/project/quick_actions'
),
markdown_help_path:
help_page_path
(
'user/markdown'
),
reset_path:
new_issuable_address_project_path
(
@project
,
issuable_type:
issuable_type
)
}
}
-
else
-
new_project_issue_button_path
=
@project
.
archived?
?
false
:
new_project_issue_path
(
@project
)
=
render
'shared/empty_states/issues'
,
new_project_issue_button_path:
new_project_issue_button_path
,
show_import_button:
true
app/views/projects/merge_requests/index.html.haml
View file @
76f348d1
...
...
@@ -26,6 +26,6 @@
=
render
'merge_requests'
,
new_merge_request_path:
new_merge_request_path
-
if
new_merge_request_email
.gl-text-center.gl-pt-5.gl-pb-7
.js-issu
e
able-by-email
{
data:
{
initial_email:
new_merge_request_email
,
issuable_type:
issuable_type
,
emails_help_page_path:
help_page_path
(
'development/emails'
,
anchor:
'email-namespace'
),
quick_actions_help_path:
help_page_path
(
'user/project/quick_actions'
),
markdown_help_path:
help_page_path
(
'user/markdown'
),
reset_path:
new_issuable_address_project_path
(
@project
,
issuable_type:
issuable_type
)
}
}
.js-issuable-by-email
{
data:
{
initial_email:
new_merge_request_email
,
issuable_type:
issuable_type
,
emails_help_page_path:
help_page_path
(
'development/emails'
,
anchor:
'email-namespace'
),
quick_actions_help_path:
help_page_path
(
'user/project/quick_actions'
),
markdown_help_path:
help_page_path
(
'user/markdown'
),
reset_path:
new_issuable_address_project_path
(
@project
,
issuable_type:
issuable_type
)
}
}
-
else
=
render
'shared/empty_states/merge_requests'
,
button_path:
new_merge_request_path
ee/spec/helpers/notes_helper_spec.rb
View file @
76f348d1
...
...
@@ -16,10 +16,10 @@ RSpec.describe NotesHelper do
end
describe
'#discussions_path'
do
subject
{
discussions_path
(
issu
e
able
)
}
subject
{
discussions_path
(
issuable
)
}
context
'for vulnerability'
do
let
(
:issu
e
able
)
{
vulnerability
}
let
(
:issuable
)
{
vulnerability
}
it
{
is_expected
.
to
eq
(
"/
#{
vulnerability
.
project
.
full_path
}
/-/security/vulnerabilities/
#{
vulnerability
.
id
}
/discussions.json"
)
}
end
...
...
spec/frontend/issues/show/issue_spec.js
View file @
76f348d1
...
...
@@ -17,7 +17,7 @@ const setupHTML = (initialData) => {
};
describe
(
'
Issue show index
'
,
()
=>
{
describe
(
'
initIssu
e
ableApp
'
,
()
=>
{
describe
(
'
initIssuableApp
'
,
()
=>
{
it
(
'
should initialize app with no potential XSS attack
'
,
async
()
=>
{
const
alertSpy
=
jest
.
spyOn
(
window
,
'
alert
'
).
mockImplementation
(()
=>
{});
const
parseDataSpy
=
jest
.
spyOn
(
parseData
,
'
parseIssuableData
'
);
...
...
spec/frontend/issues_list/components/issuables_list_app_spec.js
View file @
76f348d1
...
...
@@ -13,7 +13,7 @@ import createFlash from '~/flash';
import
Issuable
from
'
~/issues_list/components/issuable.vue
'
;
import
IssuablesListApp
from
'
~/issues_list/components/issuables_list_app.vue
'
;
import
{
PAGE_SIZE
,
PAGE_SIZE_MANUAL
,
RELATIVE_POSITION
}
from
'
~/issues_list/constants
'
;
import
issu
e
ablesEventBus
from
'
~/issues_list/eventhub
'
;
import
issuablesEventBus
from
'
~/issues_list/eventhub
'
;
import
FilteredSearchBar
from
'
~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue
'
;
jest
.
mock
(
'
~/flash
'
);
...
...
@@ -185,8 +185,8 @@ describe('Issuables list component', () => {
describe
(
'
with bulk editing enabled
'
,
()
=>
{
beforeEach
(()
=>
{
issu
e
ablesEventBus
.
$on
.
mockReset
();
issu
e
ablesEventBus
.
$emit
.
mockReset
();
issuablesEventBus
.
$on
.
mockReset
();
issuablesEventBus
.
$emit
.
mockReset
();
setupApiMock
(()
=>
[
200
,
MOCK_ISSUES
.
slice
(
0
)]);
factory
({
canBulkEdit
:
true
});
...
...
@@ -239,19 +239,19 @@ describe('Issuables list component', () => {
});
it
(
'
broadcasts a message to the bulk edit sidebar when a value is added to selection
'
,
()
=>
{
issu
e
ablesEventBus
.
$emit
.
mockReset
();
issuablesEventBus
.
$emit
.
mockReset
();
const
i1
=
wrapper
.
vm
.
issuables
[
1
];
wrapper
.
vm
.
onSelectIssuable
({
issuable
:
i1
,
selected
:
true
});
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
issu
e
ablesEventBus
.
$emit
).
toHaveBeenCalledTimes
(
1
);
expect
(
issu
e
ablesEventBus
.
$emit
).
toHaveBeenCalledWith
(
'
issuables:updateBulkEdit
'
);
expect
(
issuablesEventBus
.
$emit
).
toHaveBeenCalledTimes
(
1
);
expect
(
issuablesEventBus
.
$emit
).
toHaveBeenCalledWith
(
'
issuables:updateBulkEdit
'
);
});
});
it
(
'
does not broadcast a message to the bulk edit sidebar when a value is not added to selection
'
,
()
=>
{
issu
e
ablesEventBus
.
$emit
.
mockReset
();
issuablesEventBus
.
$emit
.
mockReset
();
return
wrapper
.
vm
.
$nextTick
()
...
...
@@ -263,19 +263,19 @@ describe('Issuables list component', () => {
})
.
then
(
wrapper
.
vm
.
$nextTick
)
.
then
(()
=>
{
expect
(
issu
e
ablesEventBus
.
$emit
).
toHaveBeenCalledTimes
(
0
);
expect
(
issuablesEventBus
.
$emit
).
toHaveBeenCalledTimes
(
0
);
});
});
it
(
'
listens to a message to toggle bulk editing
'
,
()
=>
{
expect
(
wrapper
.
vm
.
isBulkEditing
).
toBe
(
false
);
expect
(
issu
e
ablesEventBus
.
$on
.
mock
.
calls
[
0
][
0
]).
toBe
(
'
issuables:toggleBulkEdit
'
);
issu
e
ablesEventBus
.
$on
.
mock
.
calls
[
0
][
1
](
true
);
// Call the message handler
expect
(
issuablesEventBus
.
$on
.
mock
.
calls
[
0
][
0
]).
toBe
(
'
issuables:toggleBulkEdit
'
);
issuablesEventBus
.
$on
.
mock
.
calls
[
0
][
1
](
true
);
// Call the message handler
return
waitForPromises
()
.
then
(()
=>
{
expect
(
wrapper
.
vm
.
isBulkEditing
).
toBe
(
true
);
issu
e
ablesEventBus
.
$on
.
mock
.
calls
[
0
][
1
](
false
);
issuablesEventBus
.
$on
.
mock
.
calls
[
0
][
1
](
false
);
})
.
then
(()
=>
{
expect
(
wrapper
.
vm
.
isBulkEditing
).
toBe
(
false
);
...
...
spec/requests/api/todos_spec.rb
View file @
76f348d1
...
...
@@ -380,7 +380,7 @@ RSpec.describe API::Todos do
end
end
describe
'POST :id/issuable_type/:issu
e
able_id/todo'
do
describe
'POST :id/issuable_type/:issuable_id/todo'
do
context
'for an issue'
do
let_it_be
(
:issuable
)
do
create
(
:issue
,
:confidential
,
project:
project_1
)
...
...
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