Clone
 

chongsun ahn <cahn922@yahoo.com> in openlmis-referencedata

Fix sonar issues and add tests

    • -0
    • +7
    /src/main/resources/api-definition.yaml
OLMIS-3186 Fix demo data for lots

Move to earlier expiry dates. As the near expiry logic has been implemented, this demo data would cause some emails to be sent out six months prior to those dates, confusing people.

Mark integration test folders as test source not source

Mark integration test folders as test source not source

Fix incorrect location demo data

Moz and niassa demo data have latitude and longitude transposed.

OLMIS-3885 Add to CHANGELOG

OLMIS-3885 Fix more sonar issues

OLMIS-3885 Fix sonar issues

* Remove Serializable, as it may not be necessary

* Change Orderable constructor signature to less arguments

* Move constants outside of repository

* Add tests

OLMIS-3885 Add version to orderables

Add versionId to orderables and make a composite primary key. This increases the complexity of the model. In particular:

* It requires all foreign key tables to have a composite foreign key with a versionId field.

* This composite key needs to play well with Hibernate, which was done by defining OrderableIdentity and annotating it with EmbeddedId.

* Orderable no longer extends BaseEntity because a new OrderableIdentity has the id, not BaseEntity.

* A new Orderable constructor is defined to allow setting id and versionId when constructing. This seems to make more sense because an orderable should have an id (and versionId).

Also the orderable DTO needs to deal with the new meta properties. It has a unique way of determining equality because it needs to see that lastUpdated match by the actual timestamp.

Query methods were added and changed to query by latest orderable.

  1. … 26 more files in changeset.
Change AuditLogInitializer to run on separate Spring profile

On "init-audit-log" vs "refresh-db". As reference data demo data grows, this initializer takes longer and longer to finish, interrupting other processes, such as contract tests. We need to figure out how to initialize audit logging selectively.

Add demo data for report-only periods

Make Kalembo HC be part of a new family planning requisition group, with its own supervisory node. This will work on a monthly schedule with report-only periods, so that report-only requisitions can be tested/demo-ed.

    • -7
    • +16
    /src/main/resources/db/demo-data/README.md
OLMIS-4871 Move demo data to TestDataInitializer

* Change demo data strategy from JSON to CSV.

* Add more data, not from Mockaroo, but from UAT2.

* Remove old demo-data files.

* Fix sonar bugs.

    • -62
    • +0
    /demo-data/referencedata.commodity_types.json
    • -407
    • +0
    /demo-data/referencedata.dispensable_attributes.json
    • -246
    • +0
    /demo-data/referencedata.dispensables.json
    • -713
    • +0
    /demo-data/referencedata.facilities.json
    • -14
    • +0
    /demo-data/referencedata.facility_operators.json
    • -704
    • +0
    /demo-data/referencedata.facility_type_approved_products.json
  1. … 66 more files in changeset.
Revert demo data back to JSON strategy

Also, change requisition group FP 1 to use regular Monthly processing schedule (to pass requisition contract tests).

    • -0
    • +62
    /demo-data/referencedata.commodity_types.json
    • -0
    • +407
    /demo-data/referencedata.dispensable_attributes.json
    • -0
    • +246
    /demo-data/referencedata.dispensables.json
    • -0
    • +713
    /demo-data/referencedata.facilities.json
    • -0
    • +14
    /demo-data/referencedata.facility_operators.json
    • -0
    • +704
    /demo-data/referencedata.facility_type_approved_products.json
    • -0
    • +30
    /demo-data/referencedata.facility_types.json
    • -0
    • +22
    /demo-data/referencedata.geographic_levels.json
    • -0
    • +271
    /demo-data/referencedata.geographic_zones.json
  1. … 57 more files in changeset.
OLMIS-4871 Move demo data to TestDataInitializer

* Change demo data strategy from JSON to CSV.

* Add more data, not from Mockaroo, but from UAT2.

* Remove old demo-data files.

* Fix sonar bugs.

    • -62
    • +0
    /demo-data/referencedata.commodity_types.json
    • -407
    • +0
    /demo-data/referencedata.dispensable_attributes.json
    • -246
    • +0
    /demo-data/referencedata.dispensables.json
    • -713
    • +0
    /demo-data/referencedata.facilities.json
    • -14
    • +0
    /demo-data/referencedata.facility_operators.json
    • -704
    • +0
    /demo-data/referencedata.facility_type_approved_products.json
    • -30
    • +0
    /demo-data/referencedata.facility_types.json
    • -22
    • +0
    /demo-data/referencedata.geographic_levels.json
    • -271
    • +0
    /demo-data/referencedata.geographic_zones.json
  1. … 57 more files in changeset.
Move requisition group to schedule A

So that first requisition is a regular requisition.

    • -32
    • +32
    /demo-data/referencedata.processing_periods.json
    • -1
    • +1
    /demo-data/referencedata.requisition_group_program_schedules.json
Revert "OLMIS-4871 Move demo data to TestDataInitializer"

This reverts commit 55caa5a79edd5c686a07cd33ad8b8f93fc350b61.

    • -0
    • +62
    /demo-data/referencedata.commodity_types.json
    • -0
    • +407
    /demo-data/referencedata.dispensable_attributes.json
    • -0
    • +246
    /demo-data/referencedata.dispensables.json
    • -0
    • +713
    /demo-data/referencedata.facilities.json
    • -0
    • +14
    /demo-data/referencedata.facility_operators.json
    • -0
    • +704
    /demo-data/referencedata.facility_type_approved_products.json
    • -0
    • +30
    /demo-data/referencedata.facility_types.json
    • -0
    • +22
    /demo-data/referencedata.geographic_levels.json
    • -0
    • +271
    /demo-data/referencedata.geographic_zones.json
  1. … 55 more files in changeset.
Revert "OLMIS-4871 Clean up old demo data files"

This reverts commit 7d45e741ec168bbcd392919f6a564999d7519a8b.

Revert "OLMIS-4871 Fix Sonar bug"

This reverts commit f95617d5db9eb7f62ee3edc6419ecdc218b5b189.

OLMIS-4871 Fix Sonar bug

OLMIS-4871 Clean up old demo data files

OLMIS-4871 Move demo data to TestDataInitializer

* Change demo data strategy from JSON to CSV.

* Add more data, not from Mockaroo, but from UAT2.

* Remove old demo-data files.

    • -62
    • +0
    /demo-data/referencedata.commodity_types.json
    • -407
    • +0
    /demo-data/referencedata.dispensable_attributes.json
    • -246
    • +0
    /demo-data/referencedata.dispensables.json
    • -713
    • +0
    /demo-data/referencedata.facilities.json
    • -14
    • +0
    /demo-data/referencedata.facility_operators.json
    • -704
    • +0
    /demo-data/referencedata.facility_type_approved_products.json
    • -30
    • +0
    /demo-data/referencedata.facility_types.json
    • -22
    • +0
    /demo-data/referencedata.geographic_levels.json
    • -271
    • +0
    /demo-data/referencedata.geographic_zones.json
  1. … 55 more files in changeset.
OLMIS-4871 Use new Resource2Db

This fixes a byte order mark bug and allows empty strings to be considered null.

OLMIS-4871 Rename performance-data folder to demo-data

    • -0
    • +13
    /src/main/resources/db/demo-data/README.md
    • -0
    • +1001
    /src/main/resources/db/demo-data/facilities.csv
    • -0
    • +20001
    /src/main/resources/db/demo-data/facility_type_approved_products_for_Essential_Medicines___District_Hospital.csv
    • -0
    • +1001
    /src/main/resources/db/demo-data/full_supply_products.csv
  1. … 30 more files in changeset.
OLMIS-4982 Add report-only processing periods demo data

For facilitating testing.

    • -0
    • +96
    /demo-data/referencedata.processing_periods.json
    • -3
    • +3
    /demo-data/referencedata.processing_schedules.json
    • -1
    • +1
    /demo-data/referencedata.requisition_group_program_schedules.json
Update link to auth demo data README

Broken link when auth demo data strategy was changed.

OLMIS-4980 Add to CHANGELOG

OLMIS-4980 Support saving processing period extra data

For "report only" setting.

OLMIS-4980 Add extra data to processing period

This supports showing extra data (for "report only" property) for processing period.

OLMIS-4236 Fix faulty migration

New column that was no nullable should set default at the same time.

OLMIS-4105 Allow administrator to manage more CCE inventory in demo data

Since we use administrator in our performance tests, we need this user to be able to manage CCE inventory in demo data for EPI program.

    • -0
    • +8
    /demo-data/referencedata.role_assignments.json