Skip to content

Commit

Permalink
Release/2.10 (#3611)
Browse files Browse the repository at this point in the history
* Androapp 5724 remove organization unit in tei event ds card if user only has access to one org unit (#3459)

* add logic to show organisation unit

organisation unit in TEI list, DataSet and tracker program list will only be shown when user has access to more than one organisation unit.

* fix lint error

* move `displayOrgUnitName` logic to ui layer

---------

Co-authored-by: Siddharth Agarwal <[email protected]>

* [ANDROAPP-5887] update SDK (#3471)

* feat: [ANDROAPP-5830] update mobile UI version to 0.2-20240103.112017-2 (#3461)

* fix: [ANDROAPP-5830] update mobile-ui version 0.2-20240103.112017-2

* feat: [ANDROAPP-5830] add to do's and bare minimun for compilation

* ANDROAPP-5829-adapt-input-image-to-new-mobile-ui-functionality (#3462)

* Handle `Intent.ACTION_SEND` in form view for sharing files

* Open chooser intent when share button is clicked in `ImageInput`

* Open chooser intent when share button is clicked in `InputSignature``

* Move `getBitmap` extension to commons module

* Move `FormFileProvider` to commons module

* Add image detail activity

Currently we don't have a working "save image" functionality. So, it didn't make sense to copy the implementation that is not working. So for the time being I marked it as TODO

* Launch `ImageDetailActivity` instead of `ImageDetailBottomDialog`

* Remove `ImageDetailBottomDialog`

* feat: [ANDROAPP-5848] Adapt Input dropdown to new functionality (#3465)

* feat: [ANDROAPP-5848] remove old option set dialog, recycler event and deprecated code. refactor OptionSetConfiguration to default  adapt input dropdown to new functionality

* feat: [ANDROAPP-5848] remove deprecated code

* fix: [ANDROAPP-5848] remove deprecated code

* fix: [ANDROAPP-5848] ktlint fix

* fix: [ANDROAPP-5848] dismiss keyboard on dismiss popup

* fix: [ANDROAPP-5848] add old pop in again to maintain old form logic

* feat: [ANDROAPP-5848] update mobile ui to version 0.2-20240123.112704-7

* fix: [ANDROAPP-5848] sonar fix

* fix: [ANDROAPP-5848] sonar fix

---------

Co-authored-by: Sasikanth Miriyampalli <[email protected]>

* [ANDROAPP-5891] Implement new signature for compose form and maintain current for old one. (#3475)

* feat: [ANDROAPP-5568] hide program stage behavior (#3464)

* feat: [ANDROAPP-5523] change error access message at home (#3467)

* [Update develop with main] conflict resolution

* [Update develop with main] fix test

* [Update release notes] Correct typos and delete unnecessary release.info file (#3480)

* [ANDROAPP-5760] DashboardRepositoryImpl refactor to kotlin, new test implementation start

* Move shouldSuccessfullyCreateANewEvent to unit test

* Move shouldNotBeAbleToCreateNewEventsWhenFull to unit tests

* Move shouldSuccessfullySyncAChangedTEI to unit tests

* fix test

Signed-off-by: Pablo <[email protected]>

* fix test

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5645] Close enrollment data section if already completed (#3484)

---------

Signed-off-by: Pablo <[email protected]>

* feat: [ANDROAPP-5683] legend description (#3486)

* fix: [ANDROAPP-5900] adapt Input providers to new TextFieldValue usage

* fix: [ANDROAPP-5900] update mobile ui 0.2-20240206.071329-16

* fix: [ANDROAPP-5900] set initial selection to value length

* updates paging on search to paging3

* update search tests

* fix code smells

* updates sdk and prevents scroll to top when paginating

* Updates sdk

* update and adapt design library version

* fix tests

* adds helpertext to table's input field (#3487)

* show confirmation dialog

show confirmation dialog before deleting TEI or removing enrolments

* show/hide menu items

Show TEI Dashboard menu items based on correspondent authorities

* update confirm delete dialog design

Older BottomSheetDialog has now been replaced by mobile-ui  library `BottomSheetSheel` component

* Set button color style in delete bottom sheet dialog

* Run code formatting

* Fix delete button callback not working in `DeleteBottomSheetDialog`

* [ANDROAPP-5894] Adapt enrollment label to be configurable from server (#3493)

Signed-off-by: Pablo <[email protected]>

* Adds a no connection listener to Sync Dialog to show snackbar to users

* resolve code smell. now dialog uses SAM interface for the NoConnectionListener

* feat: [ANDROAPP-5896] configurable event label (#3495)

* cache some complex operations (#3494)

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5857] image download implementation (#3498)

* download image files to external directory

Signed-off-by: Pablo <[email protected]>

* download qr/barcode files to external directory

Signed-off-by: Pablo <[email protected]>

* show message when file is downloaded

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* feat: [ANDROAPP-5802] schedule events after completion (#3483)

* update: [ANDROAPP-4826] design system version updated

* add: [ANDROAPP-4826] String added

* add: [ANDROAPP-4826] Infobar added, warning message field added

* update: [ANDROAPP-4826] visual changes when there is no fields in the section

* update: [ANDROAPP-4826] code formatted, visual changes to description

* delete: [ANDROAPP-4826] Dummy section deleted in FormSectionMapper

* update: [ANDROAPP-4826] the InfoBar doesn't appears when the form is loading

* update: [ANDROAPP-4826] libs updated

* [ANDROAPP-4826] Show no fields warnings if one section and is NO_HEADER

* [ANDROAPP-4826] Refactor section warning generation to mapper

* [ANDROAPP-4826] Refactor section warning generation to mapper

* [ANDROAPP-5901] Move create button in timeline view (#3490)

* [ANDROAPP-5800] Replace xml view by ComposeView

* [ANDROAPP-5800] Set up SearchParameter structure

* [ANDROAPP-5800] Implement SearchParametersRepository

* [ANDROAPP-5800] update search query

* [ANDROAPP-500] Remove deprecated steps in walkthrough

* [ANDROAPP-500] Implement search and clear button

* [ANDROAPP-500] Implement SnackBar for min attributes search

* [ANDROAPP-500] Refactor search and clear button to SearchTEIViewModel

* [ANDROAPP-500] rebase develop and update library

* [ANDROAPP-500] show min attributes message

* [ANDROAPP-5800] handle focus

* [ANDROAPP-5800] update design library

* [ANDROAPP-5800] clear search parameters

* [ANDROAPP-5800] Use fieldUiModel for parameter provider

* [ANDROAPP-5800] insert inputstyle as parameter

* [ANDROAPP-5800] text range to textInput model

* [ANDROAPP-5800] update display name values

* [ANDROAPP-5800] show org unit selector

* [ANDROAPP-5800] remove SearchRepository.kt

* [ANDROAPP-5800] fix tests

* [ANDROAPP-5800] fix tests

* [ANDROAPP-5800]  Add composeTestRule to functional tests

* [ANDROAPP-5800]  Update design library version

* [ANDROAPP-5800]  Remove SearchParametersRepository.kt and use SearchRepositoryKt

* [ANDROAPP-5800]  provide icons based on valueType

* [ANDROAPP-5800]  Implement QR and Barcode scanning

* [ANDROAPP-5800]  fix code smells

* [ANDROAPP-5800]  clear focus on clear search

* [ANDROAPP-5800]  close keyboard om search and clear

* [ANDROAPP-5800]  close empty fields when clear search

* [ANDROAPP-5800]  request focus when item is opened

* [ANDROAPP-5800]  move focus to next item

* [ANDROAPP-5800]  enable disable search button on empty parameters

* [ANDROAPP-5805] clear search button visibility

* [ANDROAPP-5805] Adapt top bar when searching

* [ANDROAPP-5805] Add replay to mutable search flow in order to emit the first value

* [ANDROAPP-5805] Remove connected rounded corners on landscape

* [ANDROAPP-5805] update ProgramEventTest to remove check on org unit when is not visible

* [ANDROAPP-5800] configure toolbar for landscape

* [ANDROAPP-5800] remove unused program variable

* [ANDROAPP-5800] remove needs force update parameter from Form only used for search

* [ANDROAPP-5800] Remember ScanContract on SearchParametersScreen

* [ANDROAPP-5800] Clear focus when closing search

* [ANDROAPP-5800] Avoid double updating Age field

* [ANDROAPP-5800] Not loop on next click when gets the last item

* [ANDROAPP-5800] set rounded corners on show filters landscape

* [ANDROAPP-5800] fix code smell

* feat: [ANDROAPP-5794] Date Selectors (#3501)

* feat: [ANDROAPP-5794] Implement new InputDate Date and TimePicker functionalities

* feat: [ANDROAPP-5794] add selectable dates and refactor code

* feat: [ANDROAPP-5794] update design system version

* feat: [ANDROAPP-5794] update input date in scheduling dialog

* feat: [ANDROAPP-5794] adapt new design for implementations with periods

* feat: [ANDROAPP-5794] remove old calendar from event details

* feat: [ANDROAPP-5794] fix test and add year range control

* feat: [ANDROAPP-5794] fix ui test and reformat default values

* feat: [ANDROAPP-5794] sonar fix

* feat: [ANDROAPP-5794] ktlint

* feat: [ANDROAPP-5794] ktlint

* feat: [ANDROAPP-5794] update date value on reset button click

* fix: [ANDROAPP-5802] scheduling dialog not displayed (#3507)

* [ANDROAPP-1540] Multi selection for option set in programs (#3500)

Signed-off-by: Pablo <[email protected]>

* fix(translations): sync translations from transifex (develop)

WARNING: This automated sync from transifex removed more lines than it added.
Please check carefully before merging!

* fix(translations): sync translations from transifex (develop)

* fix: CI fix for new date picker selection (#3511)

* fix: CI fix for new date picker selection

* fix: readapt to avoid flakiness

* fix: remove log printing for datepicker

* fix: ignore test

* [ANDROAPP-4457] Configurable basemaps (#3509)

Signed-off-by: Pablo <[email protected]>

* Update ActivityTestRule on SyncActivityTest

* Add function to get single tracked entity in `SearchRepositoryKt`

* Add `OnQrCodeScannedFormIntent`

* Return `OnQrCodeScanned` instead of `OnSave` when QR code is scanned

* Update `SearchRepositoryKt#trackedEntity` function to return list of TEIs

* Open TEI dashboard when a TEI is found after QR code scanning

* Update ActivityTestRule on ProgramEventTest

* feat: [ANDROAPP-5919] multiselection on dataset

* update design library

* Grouped stage events ui logic updated

* show all event stages

* add toggle button to grouped stage events

* update show logic for timeline events

* fix code styling

* fix toggle button click

Earlier when clicking on a particular stage show more buttons, all the stage events were expanding. This commit fixes this.

* update toggle button design

* update stage item ui

* update design for timeline and grouped events

* fix lint error

* fix roboto test

* fix ui test for completed events

* fix click for event and stages item

* fix `SEARCHTETEST`

* fix roboto test

* ignore depreciated test

* Ignore test WIP

* fix sonar test

* fix lint error

* fix left margin for event card

* remove data element value null or empty value

* fix text style for stage item title and descr

* fix color for skipped element

* fix metadata avatar for stage and event item

* fix lint error

* fix test notation

* [ANDROAPP-5941] Use multiplatform rule engine (#3505)

* Rename .java to .kt

Signed-off-by: Pablo <[email protected]>

* update rule engine

Signed-off-by: Pablo <[email protected]>

* update rule engine

Signed-off-by: Pablo <[email protected]>

* Rename .java to .kt

Signed-off-by: Pablo <[email protected]>

* use multiplatform rule engine

Signed-off-by: Pablo <[email protected]>

* rule engine module

Signed-off-by: Pablo <[email protected]>

* set null enrollment uid

Signed-off-by: Pablo <[email protected]>

* fix dagger

Signed-off-by: Pablo <[email protected]>

* fix tests

Signed-off-by: Pablo <[email protected]>

* fix LMIS test

Signed-off-by: Pablo <[email protected]>

* ktlint

Signed-off-by: Pablo <[email protected]>

* fix tests

Signed-off-by: Pablo <[email protected]>

* add desugar lib

Signed-off-by: Pablo <[email protected]>

* removed unused test

Signed-off-by: Pablo <[email protected]>

* fix code smells

Signed-off-by: Pablo <[email protected]>

* remove duplicated dependencies

Signed-off-by: Pablo <[email protected]>

* fix displayText

Signed-off-by: Pablo <[email protected]>

* fix test

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-2474] Import/Export database (#3503)

Signed-off-by: Pablo <[email protected]>

* fix(translations): sync translations from transifex (develop)

* fix FormTest (#3523)

* fix FormTest

Signed-off-by: Pablo <[email protected]>

* remove commented code

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* Set compose forms as default

* verifying signed commit

* fix: [ANDROAPP-5802] scheduling program stages (#3518)

* fix: [ANDROAPP-5802] scheduling program stages

* fix: [ANDROAPP-5802] scheduling program stages

* fix black screen when qr is read (#3524)

Signed-off-by: Pablo <[email protected]>

* Update SearchTETest (#3525)

* Update SearchTETest with lazyActivityScenario and composeTestRule

* fix shouldShowErrorWhenSyncEventFails

* revert Jenkinsfile changes

* shouldShowErrorWhenSyncEventFails click on event item

* feat: [ANDROAPP-5930] move details information to the registration form (#3512)

* feat: [ANDROAPP-5930] Initial commit: move enrollement date to formulary, check org unit open/close dates, modify enrollment screen

* feat: [ANDROAPP-5930] update allowed dates based on selected Org Unit correctly

* feat: [ANDROAPP-5930] remove unnecessary code and comments

* feat: [ANDROAPP-5930] amend sonar fix for failed test

* feat: [ANDROAPP-5930] correct flaky test and adapt to new enrollment flow

* feat: [ANDROAPP-5930] readapt instrumentation tests to new enrollment flow

* fix: [ANDROAPP-5930] sonar fix

* fix: [ANDROAPP-5930] format style and add Unit tests for EnrollmentRepository class

* fix: [ANDROAPP-5800] search page corrections (#3517)

* fix: [ANDROAPP-5800] filter by equals instead of contains if parameter is option set, order search params

* fix: [ANDROAPP-5800] correct value change when switching between age, month year inputs

* fix: [ANDROAPP-5800] lint check

* [ANDROAPP-5911] Fix paging3 mapping (#3526)

Co-authored-by: Manu Muñoz <[email protected]>
Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5123] Support for custom icons (#3510)

Co-authored-by: Manu Muñoz <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5309] Line listing in local analytics (#3516)

Signed-off-by: Pablo <[email protected]>
Co-authored-by: manu <[email protected]>

* fix: [ANDROAPP-5976] crash after discard or delete event (#3533)

* feat: [ANDROAPP-5952] Update design system and adapt InputAge to new … (#3531)

* feat: [ANDROAPP-5952] Update design system and adapt InputAge to new implementation, add tests for component

* fix: [ANDROAPP-5952] take timezone into account for date setting

* fix: [ANDROAPP-5952] code clean up

* fix: [ANDROAPP-5952] update design system

* fix: [ANDROAPP-5952] fix test

* Androapp 5996 error in timeline view when there are no events created (#3527)

* fix groupByStage value set method

* fix timeline events recycler view when no events

* fix the event count in timeline header

* revert get grouping change

---------

Co-authored-by: Siddharth Agarwal <[email protected]>

* fix: [ANDROAPP-5988] crash when returning to dashboard event list (#3540)

* fix feedback on delete program enrollments (#3537)

* fix feedback on delete program enrollments

* fix lint error

---------

Co-authored-by: Siddharth Agarwal <[email protected]>

* fix event card item margins (#3536)

* fix event card item margins

* fix lint error

---------

Co-authored-by: Siddharth Agarwal <[email protected]>

* ANDROAPP-5799-search-enroll-button (#3535)

* Load TE type name when search view model is created

* Use new FAB component for `CreateNewButton`

* Update search button UI

* Add old search button composable

* Remove `SearchTEListScreen.kt`

* Add `Add new $teType` button

* Rename `SearchButton_Old` to `SearchButtonWithQuery`

* Show create TEI FAB if there is query data

* Display old search button when there is search query data

* Use `CoordinatorLayout` in `fragment_search_list` layout

Rather than listening to scroll state changes manually, we can just leverage the inbuilt scroll behaviour of coordinator which is smoother.

We are using a fake appbar to wrap the header content essentially.

* Remove animated visibility from `FullSearchButtonAndWorkingList`

* Use immutable map in `FullSearchButtonAndWorkingList` composable

* Update design of search bar with query data

* Show search bar with query data and create new entity button in landscape

* Add icon to search button

* Use lower case TE type name in the create button

* Update working list chip group spacing

* fix: [ANDROAPP-5982] "All [TE Type]" search and relationship search crash (#3542)

* [ANDROAPP-5123] Do not use app MetadataIcon (#3539)

* refactor custom icons

Signed-off-by: Pablo <[email protected]>

* fix program metadata icon

Signed-off-by: Pablo <[email protected]>

* fix tests

Signed-off-by: Pablo <[email protected]>

* fix eventi

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5309] fix table dimensions (#3541)

* fix table dimensions

Signed-off-by: Pablo <[email protected]>

* design comments

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>
Co-authored-by: Andrés Miguel Rubio <[email protected]>

* fix: [ANDROAPP-5930] remove old unnecessary header and modify edit en… (#3538)

* fix: [ANDROAPP-5930] remove old unnecessary header and modify edit enrollment corners and header

* fix: [ANDROAPP-5930] wait for idle in test

* fix: [ANDROAPP-5930] refactor methods

* [ANDROAPP-5952] input age prompt stays at beginning (#3543)

* refactor custom icons

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-5930] update design system and adapt input for textfieldValue

* fix: [ANDROAPP-5930] add null checks for value format

* fix: [ANDROAPP-5952] correct test

* fix: [ANDROAPP-5952] amend rebase conflic resolution update design system

---------

Signed-off-by: Pablo <[email protected]>
Co-authored-by: Pablo <[email protected]>

* [ANDROAPP-5805] Move details information to Event Data entry (#3528)

* [ANDROAPP-5805] Simplify if else on EventDate

* [ANDROAPP-5805] Remove MviIntent interface

* [ANDROAPP-5805] Remove nullable parameters forced by using search

* [ANDROAPP-5805] Add Event details section with report date

* [ANDROAPP-5805] Add Event Org unit in details

* [ANDROAPP-5805] Add Event Coordinates in details

* [ANDROAPP-5805] Add Event Category Combo in details

* [ANDROAPP-5805] Create Eventwithout registration and navigate to Dataentry

* [ANDROAPP-5805] Add CreateEventUseCase

* [ANDROAPP-5805] update saving attribute option combo

* [ANDROAPP-5805] move PeriodUtils to common

* [ANDROAPP-5805] Implement period selector for events

* [ANDROAPP-5805] Set EventMode and allow org unit edition on creation

* [ANDROAPP-5805] Add eventCatCombo parameter to equals method in FieldUiModelImpl

* [ANDROAPP-5805] Remove Event Detail section

* [ANDROAPP-5805] Remove date on CreateEventUseCase

* [ANDROAPP-5805] load selected category option combo

* [ANDROAPP-5805] fix test dependencies

* [ANDROAPP-5805] fix ProgramEventTest

* [ANDROAPP-5805] fix EventTest

* [ANDROAPP-5805] ktlintFormat after rebasing custom icons

* [ANDROAPP-5805] Add editable reason to EventCaptureForm

* [ANDROAPP-5931] Collapse event details and cat combo sections if completed (#3530)

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5805] fix collapsible when no coordinates

* [ANDROAPP-5805] Fix ProgramEventTest

* [ANDROAPP-5805] Fix FormTest

* [ANDROAPP-5805] Fix EventTest

* [ANDROAPP-5805] Fix ProgramEventTest

* [ANDROAPP-5805] Add idlingResource to EventCaptureFormPresenter

* [ANDROAPP-5805] Handle remove org unit when creating event

* [ANDROAPP-5805] Handle adding cat combo

* [ANDROAPP-5805] Handle adding cat combo

* [ANDROAPP-5805] fix code smells

* [ANDROAPP-5805] fix code smells

---------

Signed-off-by: Pablo <[email protected]>
Co-authored-by: Pablo <[email protected]>

* Change start padding of event item when grouped (#3546)

* Update android sdk 1.10.0 snapshot 36 (#3547)

* fix: [ANDROAPP-5923] All enrollment screen crash (#3534)

* prevents crash on All enrollments screen

* removes deleted view tags from test

* removes useless non-null access

* Add idilingResource to event tests (#3550)

* Update release start job (#3549)

* release_start workflow

* Update release-start.yml

---------

Co-authored-by: manu <[email protected]>

* Update version to 2.10

* fix: [ANDROAPP-6003] multiselection checked values (#3545)

* fix: [ANDROAPP-5981]  the app crashes randomly when scheduling new events in tracker program (#3521)

* fix: [ANDROAPP-5981] filter by distinct events when updating to avoid duplicate calls to same event

* fix: [ANDROAPP-5981] remove unnecessary subscription to observer, remove NonNullAsserted !! assertions for option codes and org unit codes

* fix: [ANDROAPP-5981] code smells and small refactor

* fix: [ANDROAPP-5981] update with requested changes

* fix: [ANDROAPP-5981] ignore flaky test

* [ANDROAPP-6010] defect event details catcombo scope fails when modifying org unit (#3555)

* [ANDROAPP-6010] Adapt Event toolbar to new design

* [ANDROAPP-6010] Set ProgramCaptureScope to event orgunit

* [ANDROAPP-6010] check category combos for mandatory fields

* fix: [ANDROAPP-6006] update changes on dashboard (#3554)

* Add IdlingResource when completing an event (#3556)

* Update android sdk 1.10.0 snapshot 37 (#3560)

Co-authored-by: Andrés Miguel Rubio <[email protected]>

* fix icon size and alignment of program stage item (#3552)

Co-authored-by: Siddharth Agarwal <[email protected]>

* fi: [ANDROAPP-6004] All {TE Type} search now show too many result. (#3553)

* Update android sdk 1.10.0 snapshot 38 (#3562)

* Update android sdk 1.10.0 snapshot 38

* Adapt unit tests

* fix: [ANDROAPP-6017] only searched fields on searched bar (#3559)

* update desyng system (#3544)

Signed-off-by: Pablo <[email protected]>

* add anr reports in sentry (#3532)

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-6007] Use default color in metadata icons (#3557)

* use default color

Signed-off-by: Pablo <[email protected]>

* fix unit tests

Signed-off-by: Pablo <[email protected]>

* remove unused

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-6024] table resize dimensions (#3566)

* [ANDROAPP-6023] Scheduled event missbehavior (#3565)

* [ANDROAPP-6023] Remove Event initial step when scheduling and event

* [ANDROAPP-6023] add event form aesthetics rounded corners

* [ANDROAPP-6023] set entollment from schedule and by generation after create an enrollment as new events.

* [ANDROAPP-6023] Set EventMode Schedule when entering data scheduling an event

* [ANDROAPP-6023] Remove unused EventCaptureInitial package

* [ANDROAPP-6023] Change Enter/Cancel button text by Enter/Skip

* [ANDROAPP-6023] Set rounded corners on EventCaptureActivity sections

* fix: [ANDROAPP-6008] user-friendly name on search parameters (#3563)

* updates Dashboard only when new tei dashboard card is shown (#3567)

* fix: [ANDROAPP-6013] don't save events without date or catCombo (#3569)

* fix: [ANDROAPP-6040] Remove scroll to first empty item functionality (#3571)

* fix: [ANDROAPP-6040] Remove scroll to first empty item functionality

* fix: [ANDROAPP-6040] adapt test now that automatic scroll does not occur

* [Androapp-5763] cropped number when data element name wraps into second line (#3570)

* feat: [ANDROAPP-5763] implement Indicator Input throughout app

* [ANDROAPP-5763] Use biggerOrEquals for filtering legends

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-5763] Set SurfaceColor.Container as default color

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-5763] Remove xml from IndicatorViewHolder

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-5763] Replace test robots

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-5763] Remove uncommented test code

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-5763] Move spacing to vertical arrangement

Signed-off-by: andresmr <[email protected]>

---------

Signed-off-by: andresmr <[email protected]>
Co-authored-by: Xavier Molloy <[email protected]>

* fix: [ANDROAPP-6038] improved management for  Cancel event in OU dialog  (#3572)

* fix: [ANDROAPP-6038] enable add new button when exiting canceling OU dialog

* fix: [ANDROAPP-6038] small code refactor

* Update design library to 0.2-20240405.110637-52 (#3575)

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-6086] set today es event date when creating new event (#3577)

Signed-off-by: andresmr <[email protected]>

* fix: [ANDROAPP-6033] modify padding between ListCard components, add superior padding if item is first one in order to improve superior border visibility (#3568)

* fix: [ANDROAPP-6011] freeze getting dashboard events (#3574)

* fix: [ANDROAPP-6011] freeze getting dashboard events

* fix test

* fix test

* access localdatastore in background thread (#3580)

Signed-off-by: Pablo <[email protected]>

* Create build-release-candidate.yml (#3573)

* Create build-release-candidate.yml

* Update build-release-candidate.yml

* buid release candidate signing config

Signed-off-by: Pablo <[email protected]>

* set keystore path

Signed-off-by: Pablo <[email protected]>

* set missing env variables

Signed-off-by: Pablo <[email protected]>

* ktlint

Signed-off-by: Pablo <[email protected]>

* ignore schedule event test

---------

Signed-off-by: Pablo <[email protected]>
Co-authored-by: manu <[email protected]>

* [ANDROAPP-6015] update design system (#3585)

Signed-off-by: andresmr <[email protected]>

* fix: [ANDROAPP-6091] days to scheduled day (#3578)

* update version name (#3584)

* fix: [ANDROAPP-6053] ANR on dataset list (#3583)

* [ANDROAPP-5712] Update sync dialog when reopened (#3564)

* Update sync dialog when reopened

Signed-off-by: Pablo <[email protected]>

* wait for compose to idle

Signed-off-by: Pablo <[email protected]>

* use indeterminate progress in granular sync

Signed-off-by: Pablo <[email protected]>

* wait for the data to be loaded

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* Get period step on background (#3582)

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-6110] crash in program default metadata icon (#3594)

* fix: Improve performance in home and event program screen (analytics tab)  (#3595)

* Improve performance in home screen (analytics tab)

* Improve performance in program event screen (analytics tab)

* Refactor condition

* Restore deleted code

* fix: [ANDROAPP-6103] month value in scheduling dialog (#3590)

* fix component focus requester (#3587)

Co-authored-by: Siddharth Agarwal <[email protected]>

* [ANDROAPP-6106] Replace enrollment label with custom one (#3592)

* replace enrollment label with custom one

Signed-off-by: Pablo <[email protected]>

* replace enrollment label with custom one in complete dialog

Signed-off-by: Pablo <[email protected]>

* Restore enrollment list label

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* Fix IndexOutOfBounds exception in SyncStat (#3597)

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-5992] check program stage filters in WorkingListScope (#3600)

* fix: [ANDROAPP-5992] check program stage filters in WorkingListScope

* fix: [ANDROAPP-5992] check program stage filters in WorkingListScope

* [ANDROAPP-6012] Display validation errors (#3599)

* [ANDROAPP-6012] Display validation errors

Signed-off-by: Pablo <[email protected]>

* apply validation only for date value dates

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* Skip OU selection for single option in event creation (#3588)

* skip OU selection when count is 1

* fix lint error

* Fix nullable programUid for OURepository

* Fix TEIPresenter Test

* Code refactored:move functions to repository class

* Fix lint error

---------

Co-authored-by: Siddharth Agarwal <[email protected]>

* fix: [ANDROAPP-6081] set current date for new enrollment (#3603)

* [ANDROAPP-5949] OpenID login button overlaps with "Manage accounts" (#3606)

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-6119] verify array size before accessing index (#3602)

Co-authored-by: Xavier Molloy <[email protected]>

* [ANDROAPP-5787] Use search scope in a referral (#3608)

* [ANDROAPP-5787] Use search scope in a referral

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-5787] add test

Signed-off-by: Pablo <[email protected]>

* search scope must return search and capture org units

Signed-off-by: Pablo <[email protected]>

* search scope must return search and capture org units

Signed-off-by: Pablo <[email protected]>

* fix test

Signed-off-by: Pablo <[email protected]>

---------

Signed-off-by: Pablo <[email protected]>

* browserstack build tag (#3610)

* fix: [ANDROAPP-6123] key text in list cards (#3614)

Co-authored-by: DavidAparicioAlbaAsenjo <[email protected]>

* [ANDROAPP-5869] Provide different keys for fixedStickyHeader (#3607)

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-5883] periods when orgunit is closed (#3613)

* [ANDROAPP-5757] Field with error can't be disabled (#3609)

Signed-off-by: Pablo <[email protected]>

* [ANDROAPP-6126] Date parse exception when searching by unfinished date string (#3604)

Signed-off-by: Pablo <[email protected]>

* fix: [ANDROAPP-6062] clear search fields when required attributes to search (#3581)

* fix: [ANDROAPP-6062] clear search fields when required attributes to search

* add clear test

---------

Signed-off-by: Pablo <[email protected]>
Signed-off-by: andresmr <[email protected]>
Co-authored-by: Siddharth Agarwal <[email protected]>
Co-authored-by: Siddharth Agarwal <[email protected]>
Co-authored-by: Andrés Miguel Rubio <[email protected]>
Co-authored-by: Xavier Molloy <[email protected]>
Co-authored-by: Sasikanth Miriyampalli <[email protected]>
Co-authored-by: Manu Muñoz <[email protected]>
Co-authored-by: Xavier Molloy <[email protected]>
Co-authored-by: FerdyRod <[email protected]>
Co-authored-by: = <[email protected]>
Co-authored-by: dhis2-bot <[email protected]>
Co-authored-by: manu <[email protected]>
Co-authored-by: FerdyRod <[email protected]>
Co-authored-by: Víctor García <[email protected]>
Co-authored-by: GitHub Actions Bot <[email protected]>
Co-authored-by: DavidAparicioAlbaAsenjo <[email protected]>
  • Loading branch information
16 people authored Apr 29, 2024
1 parent 144f8be commit 8f4b63d
Show file tree
Hide file tree
Showing 685 changed files with 21,964 additions and 12,874 deletions.
65 changes: 52 additions & 13 deletions .github/workflows/build-release-candidate.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# This is a basic workflow that is manually triggered

name: Build Release Candidate

env:
# The name of the main module repository
main_project_module: app

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Person to greet'
# Default value if no value is explicitly provided
default: 'World'
# Input has to be provided for the workflow to run
required: true
# The data type of the input
type: string

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
greet:
Expand All @@ -22,5 +21,45 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Send greeting
run: echo "Hello ${{ inputs.name }}"
- uses: actions/checkout@v3

# Set Repository Name As Env Variable
- name: Set repository name as env variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV

- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
cache: 'gradle'

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: 'dhis_keystore.jks'
encodedString: ${{ secrets.KEYSTORE }}
- name: build prod
run: ./gradlew app:assembleDhisRelease
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
SIGNING_KEYSTORE_PATH: ${{ steps.decode_keystore.outputs.filePath }}

- name: Read version name from file
working-directory: ./gradle
id: read-version
run: echo "::set-output name=vName::$(grep 'vName' libs.versions.toml | awk -F' = ' '{print $2}' | tr -d '"')"

# Upload Artifact Build
- name: Upload Android artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.repository_name }} - Android APK
path: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-release.apk
45 changes: 36 additions & 9 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ jobs:
git config user.name "GitHub Actions Bot"
git config user.email "<[email protected]>"
- name: Run Python script to update base branch version
run: python scripts/updateVersionName.py ${{ inputs.development_version_name }}

- name: Commit and Push Changes
run: |
git add .
git commit -m "Update version to ${{ inputs.development_version_name }}"
git push
# override vName with new version
- name: Create release branch
run: git checkout -b release/${{ inputs.release_version_name }}
Expand All @@ -60,3 +51,39 @@ jobs:
git add .
git commit -m "Update version to ${{ inputs.release_version_name }}"
git push origin release/${{ inputs.release_version_name }}
update_version:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

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

- name: setup git config
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 }}

- name: Run Python script to update base branch version
run: python scripts/updateVersionName.py ${{ inputs.development_version_name }}

- 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 }}
- 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'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pipeline {
BROWSERSTACK = credentials('android-browserstack')
form_apk = sh(returnStdout: true, script: 'find form/build/outputs -iname "*.apk" | sed -n 1p')
form_apk_path = "${env.WORKSPACE}/${form_apk}"
buildTag = "${env.GIT_BRANCH} - form"
}
steps {
dir("${env.WORKSPACE}/scripts"){
Expand All @@ -71,6 +72,7 @@ pipeline {
BROWSERSTACK = credentials('android-browserstack')
compose_table_apk = sh(returnStdout: true, script: 'find compose-table/build/outputs -iname "*.apk" | sed -n 1p')
compose_table_apk_path = "${env.WORKSPACE}/${compose_table_apk}"
buildTag = "${env.GIT_BRANCH} - table"
}
steps {
dir("${env.WORKSPACE}/scripts"){
Expand All @@ -89,6 +91,7 @@ pipeline {
test_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 2p')
app_apk_path = "${env.WORKSPACE}/${app_apk}"
test_apk_path = "${env.WORKSPACE}/${test_apk}"
buildTag = "${env.GIT_BRANCH}"
}
steps {
dir("${env.WORKSPACE}/scripts"){
Expand Down
16 changes: 14 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ android {
}
}

signingConfigs {
create("release"){
keyAlias = System.getenv("SIGNING_KEY_ALIAS")
keyPassword = System.getenv("SIGNING_KEY_PASSWORD")
System.getenv("SIGNING_KEYSTORE_PATH")?.let {path->
storeFile = file(path)
}
storePassword = System.getenv("SIGNING_STORE_PASSWORD")
}
}

testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
unitTests {
Expand Down Expand Up @@ -143,6 +154,7 @@ android {
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
buildConfigField("int", "MATOMO_ID", "1")
buildConfigField("String", "BUILD_DATE", "\"" + getBuildDate() + "\"")
buildConfigField("String", "GIT_SHA", "\"" + getCommitHash() + "\"")
Expand Down Expand Up @@ -226,6 +238,7 @@ dependencies {
implementation(project(":dhis2_android_maps"))
implementation(project(":compose-table"))
implementation(project(":stock-usecase"))
implementation(project(":dhis2-mobile-program-rules"))

implementation(libs.security.conscrypt)
implementation(libs.security.rootbeer)
Expand Down Expand Up @@ -255,7 +268,6 @@ dependencies {
implementation(libs.analytics.customactivityoncrash)
implementation(platform(libs.dispatcher.dispatchBOM))
implementation(libs.dispatcher.dispatchCore)
implementation(libs.dhis2.mobile.designsystem)

coreLibraryDesugaring(libs.desugar)

Expand Down Expand Up @@ -307,4 +319,4 @@ dependencies {
androidTestImplementation(libs.test.compose.ui.test)
androidTestImplementation(libs.test.hamcrest)
androidTestImplementation(libs.dispatcher.dispatchEspresso)
}
}
68 changes: 68 additions & 0 deletions app/src/androidTest/java/org/dhis2/LazyActivityScenarioRule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package org.dhis2

import android.app.Activity
import android.content.Intent
import androidx.test.core.app.ActivityScenario
import org.junit.rules.ExternalResource

class LazyActivityScenarioRule<A : Activity> : ExternalResource {

constructor(launchActivity: Boolean, startActivityIntentSupplier: () -> Intent) {
this.launchActivity = launchActivity
scenarioSupplier = { ActivityScenario.launch<A>(startActivityIntentSupplier()) }
}

constructor(launchActivity: Boolean, startActivityIntent: Intent) {
this.launchActivity = launchActivity
scenarioSupplier = { ActivityScenario.launch<A>(startActivityIntent) }
}

constructor(launchActivity: Boolean, startActivityClass: Class<A>) {
this.launchActivity = launchActivity
scenarioSupplier = { ActivityScenario.launch<A>(startActivityClass) }
}

private var launchActivity: Boolean

private var scenarioSupplier: () -> ActivityScenario<A>

private var scenario: ActivityScenario<A>? = null

private var scenarioLaunched: Boolean = false

override fun before() {
if (launchActivity) {
launch()
}
}

override fun after() {
scenario?.close()
}

fun launch(newIntent: Intent? = null) {
if (scenarioLaunched) throw IllegalStateException("Scenario has already been launched!")

newIntent?.let { scenarioSupplier = { ActivityScenario.launch<A>(it) } }

scenario = scenarioSupplier()
scenarioLaunched = true
}

fun getScenario(): ActivityScenario<A> = checkNotNull(scenario)
}

inline fun <reified A : Activity> lazyActivityScenarioRule(
launchActivity: Boolean = true,
noinline intentSupplier: () -> Intent
): LazyActivityScenarioRule<A> =
LazyActivityScenarioRule(launchActivity, intentSupplier)

inline fun <reified A : Activity> lazyActivityScenarioRule(
launchActivity: Boolean = true,
intent: Intent? = null
): LazyActivityScenarioRule<A> = if (intent == null) {
LazyActivityScenarioRule(launchActivity, A::class.java)
} else {
LazyActivityScenarioRule(launchActivity, intent)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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
import androidx.test.espresso.matcher.ViewMatchers.withId
import org.dhis2.R
import org.dhis2.common.BaseRobot
Expand Down Expand Up @@ -55,7 +56,7 @@ class FiltersRobot : BaseRobot() {
}

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

fun acceptDateSelected() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ class ChartMatchers {
return when (chartType){
ChartType.LINE_CHART -> view is LineChart
ChartType.BAR_CHART -> view is BarChart
ChartType.TABLE -> view is ComposeView
ChartType.TABLE, ChartType.LINE_LISTING -> view is ComposeView
ChartType.SINGLE_VALUE -> view.findViewById<View>(R.id.singleValueTitle) != null
ChartType.NUTRITION -> view is LineChart
ChartType.RADAR -> view is RadarChart
ChartType.RADAR -> view is RadarChart
ChartType.PIE_CHART -> view is PieChart
}
}
Expand Down
23 changes: 19 additions & 4 deletions app/src/androidTest/java/org/dhis2/usescases/BaseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import org.dhis2.commons.idlingresource.CountingIdlingResourceSingleton
import org.dhis2.commons.idlingresource.SearchIdlingResourceSingleton
import org.dhis2.commons.prefs.Preference
import org.dhis2.form.ui.idling.FormCountingIdlingResource
import org.dhis2.usescases.eventsWithoutRegistration.EventIdlingResourceSingleton
import org.dhis2.usescases.eventsWithoutRegistration.eventDetails.ui.EventDetailIdlingResourceSingleton
import org.dhis2.usescases.programEventDetail.eventList.EventListIdlingResourceSingleton
import org.dhis2.usescases.teiDashboard.dashboardfragments.teidata.TeiDataIdlingResourceSingleton
import org.junit.After
import org.junit.Before
Expand Down Expand Up @@ -51,7 +54,7 @@ open class BaseTest {
android.Manifest.permission.ACCESS_FINE_LOCATION,
android.Manifest.permission.CAMERA
)
}else {
} else {
GrantPermissionRule.grant(
android.Manifest.permission.ACCESS_FINE_LOCATION,
android.Manifest.permission.CAMERA,
Expand All @@ -78,20 +81,26 @@ open class BaseTest {

private fun registerCountingIdlingResource() {
IdlingRegistry.getInstance().register(
EventListIdlingResourceSingleton.countingIdlingResource,
CountingIdlingResourceSingleton.countingIdlingResource,
FormCountingIdlingResource.countingIdlingResource,
SearchIdlingResourceSingleton.countingIdlingResource,
TeiDataIdlingResourceSingleton.countingIdlingResource
TeiDataIdlingResourceSingleton.countingIdlingResource,
EventIdlingResourceSingleton.countingIdlingResource,
EventDetailIdlingResourceSingleton.countingIdlingResource,
)
}

private fun unregisterCountingIdlingResource() {
IdlingRegistry.getInstance()
.unregister(
EventListIdlingResourceSingleton.countingIdlingResource,
CountingIdlingResourceSingleton.countingIdlingResource,
FormCountingIdlingResource.countingIdlingResource,
SearchIdlingResourceSingleton.countingIdlingResource,
TeiDataIdlingResourceSingleton.countingIdlingResource
TeiDataIdlingResourceSingleton.countingIdlingResource,
EventIdlingResourceSingleton.countingIdlingResource,
EventDetailIdlingResourceSingleton.countingIdlingResource,
)
}

Expand Down Expand Up @@ -129,7 +138,7 @@ open class BaseTest {
preferencesRobot.saveValue(Preference.DATE_PICKER, true)
}

private fun closeKeyboard(){
private fun closeKeyboard() {
BaseRobot().closeKeyboard()
}

Expand Down Expand Up @@ -163,6 +172,12 @@ open class BaseTest {
preferencesRobot.saveValue(Feature.COMPOSE_FORMS.name, false)
}


fun enableComposeForms() {
preferencesRobot.saveValue("SET_FROM_DEVELOPMENT", true)
preferencesRobot.saveValue(Feature.COMPOSE_FORMS.name, true)
}

companion object {
@ClassRule
@JvmField
Expand Down
Loading

0 comments on commit 8f4b63d

Please sign in to comment.