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
21e3d5ff
Commit
21e3d5ff
authored
Aug 25, 2020
by
George Koltsov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add issue importers usage pings
- Add usage pings for Issue Importers types. FogBugz, Phabricator & JIRA
parent
9087ad74
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
changelogs/unreleased/georgekoltsov-add-importing-issues-usage-pings.yml
...leased/georgekoltsov-add-importing-issues-usage-pings.yml
+5
-0
ee/changelogs/unreleased/georgekoltsov-add-importing-projects-usage-ping.yml
...eased/georgekoltsov-add-importing-projects-usage-ping.yml
+0
-5
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+5
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+15
-2
No files found.
changelogs/unreleased/georgekoltsov-add-importing-issues-usage-pings.yml
0 → 100644
View file @
21e3d5ff
---
title
:
Add issue importers usage pings (FogBugz, Phabricator, Jira)
merge_request
:
40382
author
:
type
:
added
ee/changelogs/unreleased/georgekoltsov-add-importing-projects-usage-ping.yml
deleted
100644 → 0
View file @
9087ad74
---
title
:
Add usage pings for project import using various importers (GitLab, Bitbucket, Gitea, GitHub and more)
merge_request
:
40130
author
:
type
:
added
lib/gitlab/usage_data.rb
View file @
21e3d5ff
...
@@ -523,6 +523,11 @@ module Gitlab
...
@@ -523,6 +523,11 @@ module Gitlab
gitea:
projects_imported_count
(
'gitea'
,
time_period
),
gitea:
projects_imported_count
(
'gitea'
,
time_period
),
git:
projects_imported_count
(
'git'
,
time_period
),
git:
projects_imported_count
(
'git'
,
time_period
),
manifest:
projects_imported_count
(
'manifest'
,
time_period
)
manifest:
projects_imported_count
(
'manifest'
,
time_period
)
},
issues_imported:
{
jira:
distinct_count
(
::
JiraImportState
.
where
(
time_period
),
:user_id
),
fogbugz:
projects_imported_count
(
'fogbugz'
,
time_period
),
phabricator:
projects_imported_count
(
'phabricator'
,
time_period
)
}
}
}
}
end
end
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
21e3d5ff
...
@@ -194,13 +194,16 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -194,13 +194,16 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
)
)
end
end
it
'includes
project
imports usage data'
do
it
'includes imports usage data'
do
for_defined_days_back
do
for_defined_days_back
do
user
=
create
(
:user
)
user
=
create
(
:user
)
%w(gitlab_project gitlab github bitbucket bitbucket_server gitea git manifest)
.
each
do
|
type
|
%w(gitlab_project gitlab github bitbucket bitbucket_server gitea git manifest
fogbugz phabricator
)
.
each
do
|
type
|
create
(
:project
,
import_type:
type
,
creator_id:
user
.
id
)
create
(
:project
,
import_type:
type
,
creator_id:
user
.
id
)
end
end
jira_project
=
create
(
:project
,
creator_id:
user
.
id
)
create
(
:jira_import_state
,
:finished
,
project:
jira_project
)
end
end
expect
(
described_class
.
usage_activity_by_stage_manage
({})).
to
include
(
expect
(
described_class
.
usage_activity_by_stage_manage
({})).
to
include
(
...
@@ -214,6 +217,11 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -214,6 +217,11 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
gitea:
2
,
gitea:
2
,
git:
2
,
git:
2
,
manifest:
2
manifest:
2
},
issues_imported:
{
jira:
2
,
fogbugz:
2
,
phabricator:
2
}
}
}
}
)
)
...
@@ -228,6 +236,11 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
...
@@ -228,6 +236,11 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
gitea:
1
,
gitea:
1
,
git:
1
,
git:
1
,
manifest:
1
manifest:
1
},
issues_imported:
{
jira:
1
,
fogbugz:
1
,
phabricator:
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