mirror of
https://github.com/google/nomulus
synced 2026-09-04 07:07:20 +00:00
Enhance transfer logic for transaction reporting
Explicit transfer acks/nacks reverse the roles for transaction reporting tabulation- this adds a quick check to account for this going forward. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199474444
This commit is contained in:
@@ -45,7 +45,16 @@ FROM (
|
||||
SUM(amount) AS metricValue
|
||||
FROM (
|
||||
SELECT
|
||||
entries.%CLIENT_ID% AS clientId,
|
||||
CASE
|
||||
-- Explicit transfer acks (approve) and nacks (reject) are done
|
||||
-- by the opposing registrar. Thus, for these specific actions,
|
||||
-- we swap the 'otherClientId' with the 'clientId' to properly
|
||||
-- account for this reversal.
|
||||
WHEN (entries.type = 'DOMAIN_TRANSFER_APPROVE'
|
||||
OR entries.type = 'DOMAIN_TRANSFER_REJECT')
|
||||
THEN entries.%OTHER_CLIENT_ID%
|
||||
ELSE entries.%CLIENT_ID%
|
||||
END AS clientId,
|
||||
entries.domainTransactionRecords.tld[SAFE_OFFSET(index)] AS tld,
|
||||
entries.domainTransactionRecords.reportingTime[SAFE_OFFSET(index)]
|
||||
AS reportingTime,
|
||||
|
||||
Reference in New Issue
Block a user