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
63082f24
Commit
63082f24
authored
Mar 04, 2021
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jira Issue Detail page: Jira users with username
parent
035f790e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
16 deletions
+11
-16
ee/app/serializers/integrations/jira/issue_entity.rb
ee/app/serializers/integrations/jira/issue_entity.rb
+1
-0
ee/spec/serializers/integrations/jira/issue_detail_entity_spec.rb
...serializers/integrations/jira/issue_detail_entity_spec.rb
+6
-9
ee/spec/serializers/integrations/jira/issue_entity_spec.rb
ee/spec/serializers/integrations/jira/issue_entity_spec.rb
+4
-7
No files found.
ee/app/serializers/integrations/jira/issue_entity.rb
View file @
63082f24
...
@@ -79,6 +79,7 @@ module Integrations
...
@@ -79,6 +79,7 @@ module Integrations
def
jira_user
(
user
)
def
jira_user
(
user
)
{
{
name:
user
[
'displayName'
],
name:
user
[
'displayName'
],
username:
user
[
'name'
],
web_url:
jira_web_url
(
user
),
web_url:
jira_web_url
(
user
),
avatar_url:
user
[
'avatarUrls'
][
'48x48'
]
avatar_url:
user
[
'avatarUrls'
][
'48x48'
]
}
}
...
...
ee/spec/serializers/integrations/jira/issue_detail_entity_spec.rb
View file @
63082f24
...
@@ -12,7 +12,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
...
@@ -12,7 +12,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
{
{
'displayName'
=>
'reporter'
,
'displayName'
=>
'reporter'
,
'avatarUrls'
=>
{
'48x48'
=>
'http://reporter.avatar'
},
'avatarUrls'
=>
{
'48x48'
=>
'http://reporter.avatar'
},
'name'
=>
double
'name'
=>
'reporter@reporter.com'
}
}
end
end
...
@@ -20,7 +20,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
...
@@ -20,7 +20,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
{
{
'displayName'
=>
'assignee'
,
'displayName'
=>
'assignee'
,
'avatarUrls'
=>
{
'48x48'
=>
'http://assignee.avatar'
},
'avatarUrls'
=>
{
'48x48'
=>
'http://assignee.avatar'
},
'name'
=>
double
'name'
=>
'assignee@assignee.com'
}
}
end
end
...
@@ -28,7 +28,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
...
@@ -28,7 +28,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
{
{
'displayName'
=>
'comment_author'
,
'displayName'
=>
'comment_author'
,
'avatarUrls'
=>
{
'48x48'
=>
'http://comment_author.avatar'
},
'avatarUrls'
=>
{
'48x48'
=>
'http://comment_author.avatar'
},
'name'
=>
double
'name'
=>
'comment@author.com'
}
}
end
end
...
@@ -86,11 +86,13 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
...
@@ -86,11 +86,13 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
],
],
author:
hash_including
(
author:
hash_including
(
name:
'reporter'
,
name:
'reporter'
,
username:
'reporter@reporter.com'
,
avatar_url:
'http://reporter.avatar'
avatar_url:
'http://reporter.avatar'
),
),
assignees:
[
assignees:
[
hash_including
(
hash_including
(
name:
'assignee'
,
name:
'assignee'
,
username:
'assignee@assignee.com'
,
avatar_url:
'http://assignee.avatar'
avatar_url:
'http://assignee.avatar'
)
)
],
],
...
@@ -100,6 +102,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
...
@@ -100,6 +102,7 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
comments:
[
comments:
[
hash_including
(
hash_including
(
name:
'comment_author'
,
name:
'comment_author'
,
username:
'comment@author.com'
,
avatar_url:
'http://comment_author.avatar'
,
avatar_url:
'http://comment_author.avatar'
,
note:
"<p dir=
\"
auto
\"
>Comment</p>"
,
note:
"<p dir=
\"
auto
\"
>Comment</p>"
,
created_at:
'2020-06-25T15:50:00.000+0000'
.
to_datetime
.
utc
,
created_at:
'2020-06-25T15:50:00.000+0000'
.
to_datetime
.
utc
,
...
@@ -110,12 +113,6 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
...
@@ -110,12 +113,6 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
end
end
context
'with Jira Server configuration'
do
context
'with Jira Server configuration'
do
before
do
reporter
[
'name'
]
=
'reporter@reporter.com'
assignee
[
'name'
]
=
'assignee@assignee.com'
comment_author
[
'name'
]
=
'comment@author.com'
end
it
'returns the Jira Server profile URL'
do
it
'returns the Jira Server profile URL'
do
expect
(
subject
[
:author
]).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=reporter@reporter.com'
)
expect
(
subject
[
:author
]).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=reporter@reporter.com'
)
expect
(
subject
[
:assignees
].
first
).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=assignee@assignee.com'
)
expect
(
subject
[
:assignees
].
first
).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=assignee@assignee.com'
)
...
...
ee/spec/serializers/integrations/jira/issue_entity_spec.rb
View file @
63082f24
...
@@ -12,7 +12,7 @@ RSpec.describe Integrations::Jira::IssueEntity do
...
@@ -12,7 +12,7 @@ RSpec.describe Integrations::Jira::IssueEntity do
{
{
'displayName'
=>
'reporter'
,
'displayName'
=>
'reporter'
,
'avatarUrls'
=>
{
'48x48'
=>
'http://reporter.avatar'
},
'avatarUrls'
=>
{
'48x48'
=>
'http://reporter.avatar'
},
'name'
=>
double
'name'
=>
'reporter@reporter.com'
}
}
end
end
...
@@ -20,7 +20,7 @@ RSpec.describe Integrations::Jira::IssueEntity do
...
@@ -20,7 +20,7 @@ RSpec.describe Integrations::Jira::IssueEntity do
{
{
'displayName'
=>
'assignee'
,
'displayName'
=>
'assignee'
,
'avatarUrls'
=>
{
'48x48'
=>
'http://assignee.avatar'
},
'avatarUrls'
=>
{
'48x48'
=>
'http://assignee.avatar'
},
'name'
=>
double
'name'
=>
'assignee@assignee.com'
}
}
end
end
...
@@ -61,11 +61,13 @@ RSpec.describe Integrations::Jira::IssueEntity do
...
@@ -61,11 +61,13 @@ RSpec.describe Integrations::Jira::IssueEntity do
],
],
author:
hash_including
(
author:
hash_including
(
name:
'reporter'
,
name:
'reporter'
,
username:
'reporter@reporter.com'
,
avatar_url:
'http://reporter.avatar'
avatar_url:
'http://reporter.avatar'
),
),
assignees:
[
assignees:
[
hash_including
(
hash_including
(
name:
'assignee'
,
name:
'assignee'
,
username:
'assignee@assignee.com'
,
avatar_url:
'http://assignee.avatar'
avatar_url:
'http://assignee.avatar'
)
)
],
],
...
@@ -77,11 +79,6 @@ RSpec.describe Integrations::Jira::IssueEntity do
...
@@ -77,11 +79,6 @@ RSpec.describe Integrations::Jira::IssueEntity do
end
end
context
'with Jira Server configuration'
do
context
'with Jira Server configuration'
do
before
do
reporter
[
'name'
]
=
'reporter@reporter.com'
assignee
[
'name'
]
=
'assignee@assignee.com'
end
it
'returns the Jira Server profile URL'
do
it
'returns the Jira Server profile URL'
do
expect
(
subject
[
:author
]).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=reporter@reporter.com'
)
expect
(
subject
[
:author
]).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=reporter@reporter.com'
)
expect
(
subject
[
:assignees
].
first
).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=assignee@assignee.com'
)
expect
(
subject
[
:assignees
].
first
).
to
include
(
web_url:
'http://jira.com/secure/ViewProfile.jspa?name=assignee@assignee.com'
)
...
...
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