Skip to content

Commit

Permalink
Merge pull request #3966 from dhis2/release/3.1.1-RC
Browse files Browse the repository at this point in the history
Merge Release/3.1.1 rc into main
  • Loading branch information
andresmr authored Jan 24, 2025
2 parents b66a8de + 1a8de81 commit 81cb4bc
Show file tree
Hide file tree
Showing 352 changed files with 6,859 additions and 4,854 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/release-generate-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,16 @@ jobs:
steps:

- uses: actions/checkout@v3
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

# Generate github release notes
- name: Generate release notes
working-directory: ./scripts
run: python3 generateReleaseNotes.py

- name: setup git config
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<[email protected]>"
- name: Commit changes
run: |
# Commit and push
git commit -am "Update release notes"
git push
uses: flex-development/[email protected]
with:
message: "Update release notes"
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
78 changes: 45 additions & 33 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

name: Release start

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
release_version_name:
description: 'New release version name'
Expand All @@ -18,72 +15,87 @@ on:
required: true
type: string

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
create_branch:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ inputs.release_version_name }}
RELEASE_BRANCH: 'release/${{ inputs.release_version_name }}'
TEMP_RELEASE_BRANCH: 'tmp_release/${{ inputs.release_version_name }}'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12.1

- name: setup git config
# Creates an auxiliary branch. This branch will be used to create the signed commit using the GH API.
# It is required to use an auxiliary branch because the RELEASE_BRANCH is protected and the GH API
# rejects the commit even though the user identified by the token is included in the bypass list.
- name: Create auxiliary branch
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<[email protected]>"
# override vName with new version
- name: Create release branch
run: git checkout -b release/${{ inputs.release_version_name }}
git checkout -b ${{ env.TEMP_RELEASE_BRANCH }}
git push origin ${{ env.TEMP_RELEASE_BRANCH }}
- name: Run Python script to update release branch version
run: python scripts/updateVersionName.py ${{ inputs.release_version_name }}
run: python scripts/updateVersionName.py ${{ env.RELEASE_VERSION }}

# Uses the GH API to create the signed commit.
- name: Commit and Push Changes to auxiliary branch
uses: flex-development/[email protected]
with:
message: 'Update version to ${{ env.RELEASE_VERSION }}'
ref: ${{ env.TEMP_RELEASE_BRANCH }}
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Push
# Fetch the remote commit (signed commit) and create a new branch with the RELEASE_BRANCH name.
# This is required because the RELEASE_BRANCH is protected.
- name: Create and push release branch
run: |
git add .
git commit -m "Update version to ${{ inputs.release_version_name }}"
git push origin release/${{ inputs.release_version_name }}
git reset --hard
git pull origin ${{ env.TEMP_RELEASE_BRANCH }}
git checkout -b ${{ env.RELEASE_BRANCH }}
git push origin ${{ env.RELEASE_BRANCH }}
git push origin --delete ${{ env.TEMP_RELEASE_BRANCH }}
update_version:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
DEVELOPMENT_VERSION: ${{ inputs.development_version_name }}
DEVELOPMENT_BRANCH: 'update_version_to${{ inputs.development_version_name }}'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12.1

- name: setup git config
- name: Create development branch
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<[email protected]>"
- name: Create release branch
run: git checkout -b update_version_to${{ inputs.development_version_name }}
git checkout -b ${{ env.DEVELOPMENT_BRANCH }}
git push origin ${{ env.DEVELOPMENT_BRANCH }}
- name: Run Python script to update base branch version
run: python scripts/updateVersionName.py ${{ inputs.development_version_name }}
run: python scripts/updateVersionName.py ${{ env.DEVELOPMENT_VERSION }}

- name: Commit and Push Changes
run: |
git add .
git commit -m "Update version to ${{ inputs.development_version_name }}"
git push origin update_version_to${{ inputs.development_version_name }}
uses: flex-development/[email protected]
with:
message: 'Update version to ${{ env.DEVELOPMENT_VERSION }}'
ref: ${{ env.DEVELOPMENT_BRANCH }}
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: create pull request
run: gh pr create -B develop -H update_version_to${{ inputs.development_version_name }} --title 'Merge update_version_to${{ inputs.development_version_name }} into develop' --body 'Created by Github action'
- name: Create pull request
run: gh pr create -B develop -H update_version_to${{ env.DEVELOPMENT_VERSION }} --title 'Merge ${{ env.DEVELOPMENT_BRANCH }} into develop' --body 'Created by Github action'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
//Sets cron schedule just for PUSH job
String cron_string = JOB_NAME.startsWith('android-multibranch-PUSH') ? '0 0 * * *' : ''

pipeline {
agent {
label "ec2-android"
}

triggers {
cron('0 0 * * *')
cron(cron_string)
}

options {
Expand Down
88 changes: 84 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,89 @@
# Release notes - Android App for DHIS2 - 3.1.0.1
# Release notes - Android App for DHIS2 - 3.1.1

### Bug

[ANDROAPP-6653](https://dhis2.atlassian.net/browse/ANDROAPP-6653) Large option sets freeze the app
[ANDROAPP-5888](https://dhis2.atlassian.net/browse/ANDROAPP-5888) RTSM - Stock distribution allows entry of zero values

[ANDROAPP-6665](https://dhis2.atlassian.net/browse/ANDROAPP-6665) Filters persists when exiting the program or data set
[ANDROAPP-6108](https://dhis2.atlassian.net/browse/ANDROAPP-6108) \[mobile-ui\] Bottom sheet Icon button is displaced

[ANDROAPP-6691](https://dhis2.atlassian.net/browse/ANDROAPP-6691) NullPointerException: Dataset table
[ANDROAPP-6220](https://dhis2.atlassian.net/browse/ANDROAPP-6220) Login error - Fragmentation has been destroyed

[ANDROAPP-6281](https://dhis2.atlassian.net/browse/ANDROAPP-6281) Formatting of org unit selector buttons over android navigation bar

[ANDROAPP-6282](https://dhis2.atlassian.net/browse/ANDROAPP-6282) Misalignment of TEI list and dashboard cards

[ANDROAPP-6317](https://dhis2.atlassian.net/browse/ANDROAPP-6317) App not scrolling to the top of the list after selecting or deselecting working list

[ANDROAPP-6354](https://dhis2.atlassian.net/browse/ANDROAPP-6354) \[LineListing\] search by org unit or category no working

[ANDROAPP-6394](https://dhis2.atlassian.net/browse/ANDROAPP-6394) Conflict message - Change future date message when no future date was entered

[ANDROAPP-6418](https://dhis2.atlassian.net/browse/ANDROAPP-6418) \[Data Sets\] Values are not shown after saving them

[ANDROAPP-6440](https://dhis2.atlassian.net/browse/ANDROAPP-6440) Maps view pin hidden behind location

[ANDROAPP-6457](https://dhis2.atlassian.net/browse/ANDROAPP-6457) Maps card - expanded card maybe more than 70% of the map and When the user taps outside the card \(when expanded\) the card does not collapses.

[ANDROAPP-6477](https://dhis2.atlassian.net/browse/ANDROAPP-6477) Programs are hidden after navigating to settings and back

[ANDROAPP-6480](https://dhis2.atlassian.net/browse/ANDROAPP-6480) Tei scheduled events for "today" show incorrect overdue icon

[ANDROAPP-6482](https://dhis2.atlassian.net/browse/ANDROAPP-6482) TEI Is created even if it was discarded

[ANDROAPP-6509](https://dhis2.atlassian.net/browse/ANDROAPP-6509) Assign enrollment org unit as the default org unit when creating an event

[ANDROAPP-6519](https://dhis2.atlassian.net/browse/ANDROAPP-6519) Barcode scanner crashes DHIS2-RTS

[ANDROAPP-6524](https://dhis2.atlassian.net/browse/ANDROAPP-6524) Option code is displayed instead of name

[ANDROAPP-6533](https://dhis2.atlassian.net/browse/ANDROAPP-6533) Background color is visible behind bottom navigation bar

[ANDROAPP-6535](https://dhis2.atlassian.net/browse/ANDROAPP-6535) Bidirectional relationships are created in the oppsite direction when created from TO

[ANDROAPP-6543](https://dhis2.atlassian.net/browse/ANDROAPP-6543) Image download not working correctly

[ANDROAPP-6549](https://dhis2.atlassian.net/browse/ANDROAPP-6549) DHIS2-RTS: Data entry window not closing when selecting blue bullet

[ANDROAPP-6579](https://dhis2.atlassian.net/browse/ANDROAPP-6579) Limit the menu size in the enrollment dashboard when the program name is too long.

[ANDROAPP-6628](https://dhis2.atlassian.net/browse/ANDROAPP-6628) Due Date in Scheduled Event Card Always Red

[ANDROAPP-6644](https://dhis2.atlassian.net/browse/ANDROAPP-6644) Incorrect style and icon for overdue scheduled events in

[ANDROAPP-6652](https://dhis2.atlassian.net/browse/ANDROAPP-6652) NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.view.View.getResources\(\)'...

[ANDROAPP-6657](https://dhis2.atlassian.net/browse/ANDROAPP-6657) Implement a load bar when searching in "This Area"

[ANDROAPP-6660](https://dhis2.atlassian.net/browse/ANDROAPP-6660) Incorrect list of available periods

[ANDROAPP-6667](https://dhis2.atlassian.net/browse/ANDROAPP-6667) \[Program Rules\] Warning AND Error on complete not showing

[ANDROAPP-6673](https://dhis2.atlassian.net/browse/ANDROAPP-6673) Home filters are not displayed

[ANDROAPP-6695](https://dhis2.atlassian.net/browse/ANDROAPP-6695) IllegalArgumentException: com.dhis2: Targeting S\+ \(version 31 and above\) requires that one of FLAG\_IMMUTABLE or FLAG\_MUTABL...

[ANDROAPP-6696](https://dhis2.atlassian.net/browse/ANDROAPP-6696) IllegalStateException: Can not perform this action after onSaveInstanceState

[ANDROAPP-6705](https://dhis2.atlassian.net/browse/ANDROAPP-6705) Tei attributes and data elements flagging allowed future dates as errors incorrectly in Form

[ANDROAPP-6707](https://dhis2.atlassian.net/browse/ANDROAPP-6707) Unable to complete event

[ANDROAPP-6715](https://dhis2.atlassian.net/browse/ANDROAPP-6715) Crash when selecting a checkbox option set

[ANDROAPP-6717](https://dhis2.atlassian.net/browse/ANDROAPP-6717) Crash when syncing a TEI from map screen

[ANDROAPP-6753](https://dhis2.atlassian.net/browse/ANDROAPP-6753) Event program takes too long to load in server https://data.zim-dreams.org

[ANDROAPP-6759](https://dhis2.atlassian.net/browse/ANDROAPP-6759) Version comparison returns a wrong value in some cases

[ANDROAPP-6760](https://dhis2.atlassian.net/browse/ANDROAPP-6760) Rule engine context events include deleted events

[ANDROAPP-6763](https://dhis2.atlassian.net/browse/ANDROAPP-6763) Status bar overlaps the app, obstructing buttons and making the interface unreadable

[ANDROAPP-6771](https://dhis2.atlassian.net/browse/ANDROAPP-6771) Crash when creating a tei after searching through org unit

[ANDROAPP-6774](https://dhis2.atlassian.net/browse/ANDROAPP-6774) Bottomsheet buttons padding fix

[ANDROAPP-6776](https://dhis2.atlassian.net/browse/ANDROAPP-6776) Incorrect background shown in EventInitial screen after Android 35 corrections

[ANDROAPP-6777](https://dhis2.atlassian.net/browse/ANDROAPP-6777) inconsistent behaviour in org unit selector search bar
9 changes: 0 additions & 9 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,6 @@ dependencies {

coreLibraryDesugaring(libs.desugar)

debugImplementation(libs.analytics.flipper)
debugImplementation(libs.analytics.soloader)
debugImplementation(libs.analytics.flipper.network)
debugImplementation(libs.analytics.flipper.leak)
debugImplementation(libs.analytics.leakcanary)

releaseImplementation(libs.analytics.leakcanary.noop)
releaseImplementation(libs.analytics.flipper.noop)

"dhisPlayServicesImplementation"(libs.google.auth)
"dhisPlayServicesImplementation"(libs.google.auth.apiphone)

Expand Down
37 changes: 0 additions & 37 deletions app/src/androidTest/java/org/dhis2/common/filters/FiltersRobot.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package org.dhis2.common.filters

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.TypeTextAction
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.PickerActions
import androidx.test.espresso.contrib.RecyclerViewActions
import androidx.test.espresso.matcher.ViewMatchers.withId
import org.dhis2.R
import org.dhis2.common.BaseRobot
import org.dhis2.common.matchers.DatePickerMatchers.Companion.matchesDate
import org.dhis2.commons.filters.FilterHolder

fun filterRobotCommon(robotBody: FiltersRobot.() -> Unit) {
FiltersRobot().apply {
Expand All @@ -19,43 +14,11 @@ fun filterRobotCommon(robotBody: FiltersRobot.() -> Unit) {
}

class FiltersRobot : BaseRobot() {
fun openFilterAtPosition(position: Int) {
onView(withId(R.id.filterRecyclerLayout)).perform(
RecyclerViewActions.actionOnItemAtPosition<FilterHolder>(position, click())
)
}

fun clickOnFromToDateOption() {
onView(withId(R.id.fromTo)).perform(click())
}

fun clickOnOrgUnitTree() {
onView(withId(R.id.ouTreeButton)).perform(click())
}

fun selectDate(year: Int, monthOfYear: Int, dayOfMonth: Int) {
onView(withId(R.id.datePicker)).perform(
PickerActions.setDate(year, monthOfYear, dayOfMonth)
)
}

fun typeOrgUnit(orgUnitName: String) {
onView(withId(R.id.orgUnitSearchEditText)).perform(TypeTextAction(orgUnitName))
}

fun clickAddOrgUnit() {
onView(withId(R.id.addButton)).perform(click())
}

fun selectNotSyncedState() {
onView(withId(R.id.stateNotSynced)).perform(click())
}

fun acceptDateSelected() {
onView(withId(R.id.acceptBtn)).perform(click())
}

fun checkDate(year: Int, monthOfYear: Int, dayOfMonth: Int) {
onView(withId(R.id.datePicker)).check(matches(matchesDate(year, monthOfYear, dayOfMonth)))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class KeyStoreRobot(private val keystore: AndroidSecureStore) {
}

companion object {
const val KEYSTORE_USERNAME = "username"
const val KEYSTORE_USERNAME = "android"
const val KEYSTORE_PASSWORD = "password"
const val USERNAME = "android"
const val PASSWORD = "Android123"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ class MockWebServerRobot(private val dhis2MockServer: Dhis2MockServer) {
}

companion object {
const val API_OLD_TRACKED_ENTITY_PATH = "/api/trackedEntityInstances/query?.*"
const val API_OLD_TRACKED_ENTITY_RESPONSE =
"mocks/teilist/old_tracked_entity_empty_response.json"
const val API_OLD_EVENTS_PATH = "/api/events?.*"
const val API_OLD_EVENTS_RESPONSE = "mocks/teilist/old_events_empty_response.json"

const val API_TRACKED_ENTITY_ATTRIBUTES_RESERVED_VALUES_PATH =
"/api/trackedEntityAttributes/lZGmxYbs97q/generateAndReserve?.*"
const val API_TRACKED_ENTITY_ATTRIBUTES_RESERVED_VALUES_RESPONSE =
"mocks/teidashboard/tracked_entity_attribute_reserved_values.json"
const val API_TRACKED_ENTITY_PATH = "/api/tracker/trackedEntities?.*"
const val API_TRACKED_ENTITY_EMPTY_RESPONSE =
"mocks/teilist/tracked_entity_empty_response.json"
const val API_EVENTS_PATH = "/api/tracker/events?.*"
const val API_EVENTS_EMPTY_RESPONSE = "mocks/teilist/events_empty_response.json"
}
}
Loading

0 comments on commit 81cb4bc

Please sign in to comment.