Skip to content

Commit

Permalink
+Fixed bug in gam report where event names were not put in upper ca…
Browse files Browse the repository at this point in the history
…se for: `chrome`, `contextawareaccess`, `datastudio` and `jamboard`.
  • Loading branch information
taers232c committed Jun 9, 2021
1 parent bb5030b commit ad6d2e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
6.04.03

Fixed bug in `gam report` where event names were not put in upper case for:
`chrome`, `contextawareaccess`, `datastudio` and `jamboard`.

6.04.02

Added `chrome`, 'contextawareaccess` and `datastudio` to `<ActivityApplicationName>` so you can do `gam report xxx`.
Added `chrome`, `contextawareaccess` and `datastudio` to `<ActivityApplicationName>` so you can do `gam report xxx`.

6.04.01

Expand Down
15 changes: 13 additions & 2 deletions src/gam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"""

__author__ = 'Ross Scroggs <[email protected]>'
__version__ = '6.04.02'
__version__ = '6.04.03'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'

import base64
Expand Down Expand Up @@ -10490,6 +10490,17 @@ def validateYYYYMMDD(argstr):
'gplus',
]

REPORT_ACTIVITIES_UPPERCASE_EVENTS = {
'access_transparency',
'admin',
'chrome',
'context_aware_access',
'data_studio',
'gcp',
'jamboard',
'mobile'
}

REPORT_ACTIVITIES_TIME_OBJECTS = {'time'}

# gam report <ActivityApplictionName> [todrive <ToDriveAttribute>*]
Expand Down Expand Up @@ -10786,7 +10797,7 @@ def processCustomerUsage(usage, lastDate):
startEndTime.Get(myarg)
elif activityReports and myarg in {'event', 'events'}:
for event in getString(Cmd.OB_EVENT_NAME_LIST).replace(',', ' ').split():
event = event.lower() if report not in {'access_transparency', 'admin', 'gcp', 'mobile'} else event.upper()
event = event.lower() if report not in REPORT_ACTIVITIES_UPPERCASE_EVENTS else event.upper()
if event not in eventNames:
eventNames.append(event)
elif activityReports and myarg == 'ip':
Expand Down

0 comments on commit ad6d2e5

Please sign in to comment.