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
1a619abf
Commit
1a619abf
authored
Oct 23, 2019
by
allison.browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address code review feedback
parent
c86cbc5f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
11 deletions
+3
-11
app/models/zoom_meeting.rb
app/models/zoom_meeting.rb
+1
-1
app/services/issues/zoom_link_service.rb
app/services/issues/zoom_link_service.rb
+1
-2
app/services/zoom_notes_service.rb
app/services/zoom_notes_service.rb
+1
-2
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+0
-6
No files found.
app/models/zoom_meeting.rb
View file @
1a619abf
...
...
@@ -14,7 +14,7 @@ class ZoomMeeting < ApplicationRecord
scope
:added_to_issue
,
->
{
where
(
issue_status: :added
)
}
scope
:removed_from_issue
,
->
{
where
(
issue_status: :removed
)
}
scope
:canonical
,
->
(
issue
)
{
where
(
issue:
issue
)
&
.
added_to_issue
}
scope
:canonical
,
->
(
issue
)
{
where
(
issue:
issue
).
added_to_issue
}
def
self
.
canonical_meeting
(
issue
)
canonical
(
issue
)
&
.
first
...
...
app/services/issues/zoom_link_service.rb
View file @
1a619abf
...
...
@@ -61,8 +61,7 @@ module Issues
end
def
remove_zoom_meeting
@added_meeting
.
issue_status
=
:removed
@added_meeting
.
save
@added_meeting
.
update
(
issue_status: :removed
)
track_meeting_removed_event
issue
.
zoom_meetings
end
...
...
app/services/zoom_notes_service.rb
View file @
1a619abf
...
...
@@ -21,8 +21,7 @@ class ZoomNotesService
private
def
zoom_link_added?
meetings
=
@issue
.
zoom_meetings
.
select
{
|
z
|
z
.
issue_status
==
"added"
}
!
meetings
.
empty?
@issue
.
zoom_meetings
.
any?
{
|
z
|
z
.
issue_status
==
"added"
}
end
def
zoom_link_added_notification
...
...
spec/services/issues/update_service_spec.rb
View file @
1a619abf
...
...
@@ -187,7 +187,6 @@ describe Issues::UpdateService, :mailer do
it
'creates system note about issue reassign'
do
note
=
find_note
(
'assigned to'
)
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
include
"assigned to
#{
user2
.
to_reference
}
"
end
...
...
@@ -202,14 +201,12 @@ describe Issues::UpdateService, :mailer do
it
'creates system note about title change'
do
note
=
find_note
(
'changed title'
)
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
eq
'changed title from **{-Old-} title** to **{+New+} title**'
end
it
'creates system note about discussion lock'
do
note
=
find_note
(
'locked this issue'
)
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
eq
'locked this issue'
end
end
...
...
@@ -221,7 +218,6 @@ describe Issues::UpdateService, :mailer do
note
=
find_note
(
'changed the description'
)
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
eq
(
'changed the description'
)
end
end
...
...
@@ -231,7 +227,6 @@ describe Issues::UpdateService, :mailer do
update_issue
(
zoom_meetings:
[
create
(
:zoom_meeting
,
issue:
issue
)])
note
=
find_note
(
'added a Zoom call'
)
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
eq
(
'added a Zoom call to this issue'
)
end
end
...
...
@@ -253,7 +248,6 @@ describe Issues::UpdateService, :mailer do
note
=
find_note
(
'made the issue confidential'
)
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
eq
'made the issue confidential'
end
...
...
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