Skip to content

Commit

Permalink
Merge pull request #838 from dhis2/develop
Browse files Browse the repository at this point in the history
Develop 0.16.1
  • Loading branch information
vgarciabnz authored May 23, 2019
2 parents aea368e + 7d33e88 commit 66c9a67
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 8 deletions.
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ ext {
buildToolsVersion: "28.0.3",
minSdkVersion : 19,
targetSdkVersion : 28,
versionCode : 131,
versionName : "0.16.0-SNAPSHOT"
versionCode : 132,
versionName : "0.16.1-SNAPSHOT"
]

libraries = [
Expand Down
4 changes: 2 additions & 2 deletions core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
# Properties which are consumed by plugins/gradle-mvn-push.gradle plugin.
# They are used for publishing artifact to snapshot repository.

VERSION_NAME=0.16.0-SNAPSHOT
VERSION_CODE=131
VERSION_NAME=0.16.1-SNAPSHOT
VERSION_CODE=132

GROUP=org.hisp.dhis

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,21 @@ public void filter_enum_int_with_not_in_with_two_elements() {
.get();
assertThat(objects.size(), is(0));
}

@Test
public void filter_string_with_is_null() {
ProgramStageCollectionRepository repository = d2.programModule().programStages
.byDescription().isNull();
List<ProgramStage> objects = repository.get();
assertThat(objects.size(), is(1));
}

@Test
public void filter_string_with_is_not_null() {
ProgramStageCollectionRepository repository = d2.programModule().programStages
.byDescription().isNotNull();
List<ProgramStage> objects = repository.get();
assertThat(objects.size(), is(1));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,13 @@ public R notIn(Collection<V> values) {
public final R notIn(V... values) {
return notIn(Arrays.asList(values));
}

public final R isNull() {
return newWithUnwrappedScope("", "IS NULL");
}

public final R isNotNull() {
return newWithUnwrappedScope("", "IS NOT NULL");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ public final class EventCollectionRepository

@Override
public Callable<WebResponse> upload() {
return () -> postCall.call(byState().in(State.TO_POST, State.TO_UPDATE, State.TO_DELETE).getWithoutChildren());
return () -> postCall.call(
byState().in(State.TO_POST, State.TO_UPDATE, State.TO_DELETE)
.byEnrollmentUid().isNull()
.getWithoutChildren());
}

public StringFilterConnector<EventCollectionRepository> byUid() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

public final class EventStoreImpl extends IdentifiableObjectWithStateStoreImpl<Event> implements EventStore {

private static final String QUERY_SINGLE_EVENTS = "SELECT Event.* FROM Event WHERE Event.enrollment ISNULL";
private static final String QUERY_SINGLE_EVENTS = "SELECT Event.* FROM Event WHERE Event.enrollment IS NULL";

private static final StatementBinder<Event> BINDER = (o, sqLiteStatement) -> {
sqLiteBind(sqLiteStatement, 1, o.uid());
Expand Down
2 changes: 0 additions & 2 deletions core/src/sharedTest/resources/program/program_stages.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@
"id": "dBwrot7S421",
"created": "2015-04-12T15:30:43.805",
"name": "Child care visit - demo",
"description": "Description 2",
"displayDescription": "Display Description 2",
"allowGenerateNextVisit": true,
"executionDateLabel": "Visit date 2",
"validCompleteOnly": false,
Expand Down

0 comments on commit 66c9a67

Please sign in to comment.