Fixed: [export] Fix checking of null value: take also empty string value

This commit is contained in:
2023-01-11 17:42:50 +01:00
parent 582983f5ef
commit 01790fa0cf
42 changed files with 72 additions and 33 deletions

View File

@@ -60,7 +60,7 @@ class ByCreatorAggregator implements AggregatorInterface
return 'Created by';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -65,7 +65,7 @@ class BySocialActionAggregator implements AggregatorInterface
return 'Social action';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -65,7 +65,7 @@ class BySocialIssueAggregator implements AggregatorInterface
return 'Social issues';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -65,7 +65,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
return 'Accepted thirdparty';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -65,7 +65,7 @@ class CreatorScopeAggregator implements AggregatorInterface
return 'Scope';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -71,7 +71,7 @@ class ActivityTypeAggregator implements AggregatorInterface
return 'Activity type';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -66,7 +66,7 @@ class ActivityUserAggregator implements AggregatorInterface
return 'Activity user';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -64,7 +64,7 @@ class ActivityUsersAggregator implements AggregatorInterface
return 'Activity users';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -63,7 +63,7 @@ class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorI
return 'Users \'s job';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -63,7 +63,7 @@ class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\Aggregato
return 'Users \'s scope';
}
if (null === $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -134,6 +134,10 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return 'reasons' === $data['level'] ? 'Group by reasons' : 'Group by categories of reason';
}
if (null === $value || '' === $value) {
return '';
}
switch ($data['level']) {
case 'reasons':
$r = $this->activityReasonRepository->find($value);

View File

@@ -57,6 +57,7 @@ class SentReceivedAggregator implements AggregatorInterface
switch ($value) {
case null:
case '':
return '';
case 'sent':