openlmis-cce

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
OLMIS-4105 Update RAML with active query parameter

    • -1
    • +6
    /src/main/resources/api-definition.yaml
OLMIS-4197 Change schema from dismissed to dismissTimestamp

Will need the timestamp to show when the alert was dismissed, but we do not need both values.

    • -14
    • +14
    /src/main/java/org/openlmis/cce/domain/Alert.java
Fix sonar issues

OLMIS-3174: Update the FunctionalStatus and ReasonNotWorkingOrNotInUse enums

    • -126
    • +126
    /demo-data/cce.cce_inventory_items.json
    • -2
    • +2
    /src/main/resources/api-definition.yaml
  1. … 3 more files in changeset.
OLMIS-4105 Support alert_id in DTO to be a non-UUID string

This is done by adding a new field called externalId which is what is mapped to alert_id. Validation added to make sure it matches FHID id datatype regex. New repository methods and make sure JPA knows to update based on externalId, not id.

    • -11
    • +16
    /src/main/java/org/openlmis/cce/domain/Alert.java
OLMIS-4105 Ensure status keys are in correct locale format

Validate alert status keys are in correct locale format. Fix demo data as well.

    • -9
    • +9
    /demo-data/cce.cce_alert_status_messages.json
Fix potential integration test failure

Ensure the dates are in the exact same format.

OLMIS-4129 Add active field to Alert to simply queries

To make the queries more readable, add an active field to Alert, which is determined by the other fields. Save this to database, so the queries can read from it.

OLMIS-4125 Add demo data for CCE alerts

Add inactive alerts to CCE inventory at Cuamba, Cuamba, for testing.

    • -0
    • +15
    /demo-data/cce.cce_alert_status_messages.json
OLMIS-2895: Extended GET /inventoryItems endpoint

+ added searching by program id

+ added sort option (default sort is Reference Name alphabetically (A->Z))

+ if user has no rights, the empty page will be returned

    • -1
    • +13
    /src/main/resources/api-definition.yaml
OLMIS-4129 Add unit tests

To check branching logic in controller.

    • -0
    • +105
    /src/test/java/org/openlmis/cce/web/AlertControllerTest.java
OLMIS-4129 Retain end timestamp and dismissed values

Retain values from existing alert if they were not passed in from DTO. This is so different alert saves can save different parts of the alert without overwriting other parts not specified.

    • -0
    • +84
    /src/test/java/org/openlmis/cce/domain/AlertTest.java
OLMIS-4129 Allow any token to save CCE alerts

Any token (user, service, API key) should be able to save alerts, since we are going to use the same API to for other clients, like the UI.

OLMIS-4129 Allow dismissed to be null

This is so alerts can be created with dismissed as nullable, which implicitly means false. This is so we do not explicitly set dismissed to false when constructing it.

OLMIS-4105 Change start and end timestamp to ISO date

Changed from Unix epoch in milliseconds to ISO-formatted date.

    • -2
    • +2
    /src/main/resources/schemas/cceAlert.json
OLMIS-4105 Add logger warning message about device ID not found

To determine what device ID was provided that was not found in the system.

OLMIS-4127 Add demo data for CCE alerts

An assortment of alerts at Lurio, Cuamba district.

    • -0
    • +32
    /demo-data/cce.cce_alert_status_messages.json
    • -0
    • +45
    /demo-data/cce.cce_alerts.json
OLMIS-4105 Change alert type from enum to string

We do not use the type in any business logic, so it would couple too much how we understand alert types. If a new type is saved, we do not need to add to the enum.

OLMIS-4105 Message strings added

OLMIS-4105 Add support for filtering by active alerts

New query methods had to be created to support querying by device IDs, active, or both. Some were made into native queries.

OLMIS-4105 Make dismissed not nullable

So that dismissed must either be true or false and not a third state (null). This is to simplify querying.

OLMIS-4105 Support searching for alerts by multiple device IDs

OLMIS-4105 Add test coverage

For Sonar.

    • -0
    • +80
    /src/test/java/org/openlmis/cce/dto/AlertDtoTest.java
OLMIS-4105 Add CCE alerts resource

Add save alert and get alerts.

    • -0
    • +151
    /src/main/java/org/openlmis/cce/domain/Alert.java
    • -0
    • +25
    /src/main/java/org/openlmis/cce/domain/AlertType.java
    • -0
    • +139
    /src/main/java/org/openlmis/cce/dto/AlertDto.java
    • -0
    • +42
    /src/main/java/org/openlmis/cce/i18n/AlertMessageKeys.java
    • -0
    • +30
    /src/main/java/org/openlmis/cce/repository/AlertRepository.java
    • -0
    • +157
    /src/main/java/org/openlmis/cce/web/AlertController.java
    • -2
    • +2
    /src/main/resources/schemas/cceAlert.json
OLMIS-4105 Change timestamps to numbers in JSON schema

We may be using Unix epoch timestamps for now.

    • -2
    • +2
    /src/main/resources/schemas/cceAlert.json
Add db port in override

So port can be accessible to the host.

Improve integration test performance

So Spring does not create a new application context for each integration test class, move mock beans to superclass.

Modify CCE inventory domain importer

Changed import signature to not require lastModifierId as an argument, since it should be set in the importer itself.

OLMIS-4105 API RAML and json schemas

For getting, creating and updating CCE alerts.

    • -0
    • +39
    /src/main/resources/api-definition.yaml
    • -0
    • +51
    /src/main/resources/schemas/cceAlert.json
    • -0
    • +25
    /src/main/resources/schemas/cceAlertPage.json
    • -0
    • +15
    /src/main/resources/schemas/cceAlertStatusMessages.json
OLMIS-4117 Remove RAML to Swagger dependency