Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Client Migration for changing the validation status to Invalid #2109

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

junaidwarsivd
Copy link

added migration for invalidating the client to trigger a revalidation
issue ref https://github.com/opensrp/support/issues/234

@@ -234,7 +234,7 @@ android {
versionName "1.0.8"
buildConfigField "int", "OPENMRS_UNIQUE_ID_INITIAL_BATCH_SIZE", '10000'
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '10000'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changed?

Copy link
Author

@junaidwarsivd junaidwarsivd Feb 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was not pulling the unique ids from source 2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this section is under ba and not DRC

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this is under DRC

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes its under Ba it was originally '1' in BA (master branch) i've updated the correction

@@ -48,6 +48,9 @@ public static void onUpgrade(Context context, SQLiteDatabase db, int oldVersion,
case 12:
upgradeToVersion12(db);
break;
case 13:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these changes for all the flavours

  • DB migrations

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekigamba different flavors use different DB versions for instance ba is at version 23 chad using 15 drc using 13 and so on should i upgrade all the versions to the same value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, we should upgrade all the versions but to different values

Copy link

@hilpitome hilpitome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +334 to 336
versionCode 9
versionName "1.0.2"
buildConfigField "int", "OPENMRS_UNIQUE_ID_INITIAL_BATCH_SIZE", '10000'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what's the difference between liberia and LMH

default:
break;
}
upgradeTo++;
}
RepositoryUtils.updateClientValidateStatus(db);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this since it is repetitive

@@ -346,13 +346,13 @@ android {
buildConfigField "String", 'DEFAULT_LOCATION_DEBUG', '"CHA"'
buildConfigField "int", "MAX_CONNECTION_TIMEOUT", '5'
buildConfigField "int", "MAX_READ_TIMEOUT", '5'
buildConfigField "int", "DATABASE_VERSION", '8'
buildConfigField "int", "DATABASE_VERSION", '9'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when(mockPatient.getColumnmaps()).thenReturn(map);
when(map.get(DBConstants.KEY.DOB)).thenReturn(dobString);
AllClientsUtils.goToChildProfile(mockActivity, mockPatient, mockBundle);
verify(mockActivity).startActivity(ArgumentMatchers.any());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly specify the specific activity called in this argument/param

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants