google-nomulus/core
Lai Jiang 4b6811d4c3 Handle cases where periodYears is NULL in a OneTime (#1187)
There are cases where periodYears is not set when creating a OneTime
billing event, for example when performing a registry lock (default cost = $0)
or when performing a server status update, such as applying the
serverUpdateProhibited status (default cost = $20). This is not currently
handled currently in the billing pipeline because the parseFromRecord
method checks for nullness for all fields. Even if it does not validate
the fields, the null periodYears will still cause problem when the
billing event is converted to CSV files.

This PR alters the BigQuery SQL file to convert a NULL to 0 when
creating the BillingEvent in the invoicing pipeline. It also sets the EndDate
in the invoice CSV to an empty string when periodYears is 0. Note that when the
cost is also 0, the billing event is filtered out in the invoice CSV so only
the non-free OneTime with null periodYear will have an impact on the output.
For detailed reports all billing events are included and the zero
periodYears is printed as is.

Setting the EndDate to empty is the correct behavior per
go/manual-integration-csv#end-date.
2021-06-02 11:52:47 -04:00
..
gradle/dependency-locks Update GCL dependency to avoid security alert (#1139) 2021-05-17 13:21:26 -04:00
src Handle cases where periodYears is NULL in a OneTime (#1187) 2021-06-02 11:52:47 -04:00
WEB-INF/appengine-generated Enable Cloud SQL when Datastore is enabled for unit test (#502) 2020-03-10 12:26:25 -04:00
build.gradle Add methods to return subtypes of HistoryEntry when querying (#1172) 2021-05-24 11:36:11 -04:00
Dockerfile Build docker image of nomulus tool (#142) 2019-07-16 20:18:44 -04:00