Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ps
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ps
Merge requests
!5
Fix usage count.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix usage count.
issue/ps-3515883:3515883-version-1.0.1-shows
into
1.x
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Pieter Frenssen
requested to merge
issue/ps-3515883:3515883-version-1.0.1-shows
into
1.x
3 months ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#3515883
0
0
Merge request reports
Compare
1.x
version 1
acc79a63
3 months ago
1.x (base)
and
latest version
latest version
acc79a63
1 commit,
3 months ago
version 1
acc79a63
1 commit,
3 months ago
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/ParagraphsStats.php
+
4
−
4
Options
@@ -383,11 +383,11 @@ class ParagraphsStats {
$query
=
"SELECT t.*,
IF(t.cnt > :ul4, 4, IF(t.cnt > :ul3, 3, IF(t.cnt > :ul2, 2, IF(t.cnt > :ul1, 1, 0)))) as usage_level
FROM (
SELECT ti.
*
, COUNT(*) AS cnt
SELECT ti.
type, ti.parent_type, ti.entity_type
, COUNT(*) AS cnt
FROM ("
.
$sqlCore
.
") ti
WHERE ti.entity_type IS NOT NULL
AND ti.is_active <> ''
GROUP BY ti.
id, ti.status, ti.parent_id, ti.type, ti.parent_field_nam
e, ti.parent_type, ti.entity_type
, ti.is_active
GROUP BY ti.
typ
e, ti.parent_type, ti.entity_type
ORDER BY ti.type
) t"
;
@@ -458,14 +458,14 @@ class ParagraphsStats {
// Get the main dataset for the report.
$sqlCore
=
$this
->
getSqlCore
(
$type
);
$query
=
"SELECT t.
*
, COUNT(*) AS occurrence
$query
=
"SELECT t.
parent_id, t.parent_field_name
, COUNT(*) AS occurrence
FROM ("
.
$sqlCore
.
") t
WHERE t.entity_type IS NOT NULL
AND t.is_active <> ''
AND t.parent_type = :type
AND t.type = :par
AND t.entity_type = :bun
GROUP BY
t.id,
t.parent_id,
t.status,
t.parent_field_name
, t.is_active
GROUP BY t.parent_id, t.parent_field_name
ORDER BY occurrence DESC"
;
$ddData
=
$this
->
database
->
query
(
$query
,
[
Loading