Skip to content
Snippets Groups Projects
Commit 63082f24 authored by Arturo Herrero's avatar Arturo Herrero
Browse files

Jira Issue Detail page: Jira users with username

parent 035f790e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -79,6 +79,7 @@ class IssueEntity < Grape::Entity
def jira_user(user)
{
name: user['displayName'],
username: user['name'],
web_url: jira_web_url(user),
avatar_url: user['avatarUrls']['48x48']
}
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@
{
'displayName' => 'reporter',
'avatarUrls' => { '48x48' => 'http://reporter.avatar' },
'name' => double
'name' => 'reporter@reporter.com'
}
end
 
Loading
Loading
@@ -20,7 +20,7 @@
{
'displayName' => 'assignee',
'avatarUrls' => { '48x48' => 'http://assignee.avatar' },
'name' => double
'name' => 'assignee@assignee.com'
}
end
 
Loading
Loading
@@ -28,7 +28,7 @@
{
'displayName' => 'comment_author',
'avatarUrls' => { '48x48' => 'http://comment_author.avatar' },
'name' => double
'name' => 'comment@author.com'
}
end
 
Loading
Loading
@@ -86,11 +86,13 @@
],
author: hash_including(
name: 'reporter',
username: 'reporter@reporter.com',
avatar_url: 'http://reporter.avatar'
),
assignees: [
hash_including(
name: 'assignee',
username: 'assignee@assignee.com',
avatar_url: 'http://assignee.avatar'
)
],
Loading
Loading
@@ -100,6 +102,7 @@
comments: [
hash_including(
name: 'comment_author',
username: 'comment@author.com',
avatar_url: 'http://comment_author.avatar',
note: "<p dir=\"auto\">Comment</p>",
created_at: '2020-06-25T15:50:00.000+0000'.to_datetime.utc,
Loading
Loading
@@ -110,12 +113,6 @@
end
 
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
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')
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@
{
'displayName' => 'reporter',
'avatarUrls' => { '48x48' => 'http://reporter.avatar' },
'name' => double
'name' => 'reporter@reporter.com'
}
end
 
Loading
Loading
@@ -20,7 +20,7 @@
{
'displayName' => 'assignee',
'avatarUrls' => { '48x48' => 'http://assignee.avatar' },
'name' => double
'name' => 'assignee@assignee.com'
}
end
 
Loading
Loading
@@ -61,11 +61,13 @@
],
author: hash_including(
name: 'reporter',
username: 'reporter@reporter.com',
avatar_url: 'http://reporter.avatar'
),
assignees: [
hash_including(
name: 'assignee',
username: 'assignee@assignee.com',
avatar_url: 'http://assignee.avatar'
)
],
Loading
Loading
@@ -77,11 +79,6 @@
end
 
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
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')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment