Skip to content

Commit be48309

Browse files
Merge branch 'master' into master-transifex-ALL-20241116_224216
2 parents 22c1168 + 0167196 commit be48309

File tree

296 files changed

+5537
-3295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+5537
-3295
lines changed

.github/workflows/run-api-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ jobs:
4141
# build and publish multi-arch images using Jib. Image is used for api tests in
4242
# this workflow and can be pulled from Dockerhub by devs to run locally, ...
4343
mvn clean verify --threads 2C --batch-mode --no-transfer-progress \
44-
-DskipTests --update-snapshots --file dhis-2/pom.xml \
44+
-DskipTests -Dmdep.analyze.skip --update-snapshots --file dhis-2/pom.xml \
4545
--projects dhis-web-server --also-make --activate-profiles jibBuild \
4646
-Djib.to.image=$CORE_IMAGE_NAME -Djib.container.labels=DHIS2_BUILD_REVISION=${{github.event.pull_request.head.sha}},DHIS2_BUILD_BRANCH=${{github.head_ref}}
4747
else
4848
# only build image for running api tests in this workflow i.e. master, 2.39, ...
4949
mvn clean verify --threads 2C --batch-mode --no-transfer-progress \
50-
-DskipTests --update-snapshots --file dhis-2/pom.xml \
50+
-DskipTests -Dmdep.analyze.skip --update-snapshots --file dhis-2/pom.xml \
5151
--projects dhis-web-server --also-make --activate-profiles jibDockerBuild \
5252
-Djib.to.image=$CORE_IMAGE_NAME
5353
fi

.github/workflows/run-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
- name: Run unit tests
2525
run: mvn clean test --threads 2C --batch-mode --no-transfer-progress --update-snapshots --file ./dhis-2/pom.xml --activate-profiles unit-test
2626
timeout-minutes: 30
27+
- name: Run dependency analysis
28+
run: mvn dependency:analyze --file ./dhis-2/pom.xml
29+
timeout-minutes: 2
2730
- name: Report coverage to codecov
2831
uses: codecov/codecov-action@v3
2932
with:

dhis-2/dhis-api/src/main/java/org/hisp/dhis/category/CategoryCombo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828
package org.hisp.dhis.category;
2929

30+
import com.fasterxml.jackson.annotation.JsonIgnore;
3031
import com.fasterxml.jackson.annotation.JsonProperty;
3132
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
3233
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
@@ -195,6 +196,11 @@ public boolean hasOptionCombos() {
195196
return optionCombos != null && !optionCombos.isEmpty();
196197
}
197198

199+
@JsonIgnore
200+
public List<Category> getDataDimensionCategories() {
201+
return categories.stream().filter(Category::isDataDimension).toList();
202+
}
203+
198204
// -------------------------------------------------------------------------
199205
// Logic
200206
// -------------------------------------------------------------------------

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObjectUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ public static DimensionalObject linkAssociations(
141141
EventAnalyticalObject eventAnalyticalObject,
142142
DimensionalObject dimensionalObject,
143143
Attribute parent) {
144-
// Associating event repetitions.
145144
List<EventRepetition> repetitions = eventAnalyticalObject.getEventRepetitions();
146145

147146
if (isNotEmpty(repetitions)) {

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectManager.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ <T extends IdentifiableObject> List<T> getByCode(
182182
@CheckForNull
183183
<T extends IdentifiableObject> T search(@Nonnull Class<T> type, @Nonnull String query);
184184

185-
@Nonnull
186-
<T extends IdentifiableObject> List<T> filter(@Nonnull Class<T> type, @Nonnull String query);
187-
188185
@Nonnull
189186
<T extends IdentifiableObject> List<T> getAll(@Nonnull Class<T> type);
190187

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/OpenApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ enum Status {
469469
*/
470470
@Target(ElementType.TYPE)
471471
@Retention(RetentionPolicy.RUNTIME)
472+
@Inherited
472473
@interface Shared {
473474

474475
/**

dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/collection/CollectionUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ private static <T> Set<T> union(@Nonnull Set<T>... more) {
214214
* @return a string, or null if no matches.
215215
*/
216216
public static String popStartsWith(Collection<String> collection, String prefix) {
217+
if (collection == null || collection.isEmpty()) return null;
217218
Iterator<String> iterator = collection.iterator();
218219

219220
while (iterator.hasNext()) {

dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/embedded/EmbeddedDashboard.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
import lombok.NoArgsConstructor;
3535
import lombok.Setter;
3636

37-
/** Encapsulates metadata for an embedded and externally provided dashboard. */
37+
/**
38+
* Encapsulates metadata for an embedded and externally provided dashboard.
39+
*
40+
* @author Lars Helge Overland
41+
*/
3842
@Getter
3943
@Setter
4044
@NoArgsConstructor

dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/embedded/FilterOptions.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
import lombok.NoArgsConstructor;
3535
import lombok.Setter;
3636

37+
/**
38+
* Encapsulates embedded dashboard filter options.
39+
*
40+
* @author Lars Helge Overland
41+
*/
3742
@Getter
3843
@Setter
3944
@NoArgsConstructor

dhis-2/dhis-services/dhis-service-node/src/main/java/org/hisp/dhis/fieldfilter/Defaults.java renamed to dhis-2/dhis-api/src/main/java/org/hisp/dhis/fieldfilter/Defaults.java

File renamed without changes.

0 commit comments

Comments
 (0)