Skip to content

Commit

Permalink
Merge branch 'master' into riese/fuzzy_date
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinRiese authored Sep 6, 2024
2 parents 1c2e1c7 + 1e0ade6 commit 75e7234
Show file tree
Hide file tree
Showing 172 changed files with 5,245 additions and 1,373 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
// https://eslint.org/docs/4.0.0/user-guide/configuring#specifying-parser-options
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
},

// http://eslint.org/docs/user-guide/configuring#specifying-environments
Expand Down
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,19 @@
/corehq/warehouse/ @calellowitz
/corehq/warnings.py @millerdev

/corehq/apps/accounting/ @dannyroberts @biyeun
/corehq/apps/accounting/ @dannyroberts @biyeun @nospame
/corehq/apps/analytics/ @biyeun
/corehq/apps/app_manager/ @orangejenny
/corehq/apps/callcenter/ @snopoke
/corehq/apps/case_search/ @orangejenny @MartinRiese @esoergel @AddisonDunn @stephherbers @Robert-Costello @Jtang-1 @nospame
/corehq/apps/case_search/ @orangejenny @MartinRiese @esoergel @AddisonDunn @stephherbers @Robert-Costello @Jtang-1
/corehq/apps/change_feed/ @dannyroberts
/corehq/apps/cleanup/management/commands/populate_sql_model_from_couch_model.py @millerdev
/corehq/apps/cloudcare/ @orangejenny @MartinRiese @AddisonDunn @stephherbers @Robert-Costello @Jtang-1 @nospame
/corehq/apps/commtrack/ @esoergel
/corehq/apps/data_dictionary/ @esoergel @orangejenny @zandre-eng
/corehq/apps/domain/decorators.py @esoergel
/corehq/apps/domain/auth.py @esoergel
/corehq/apps/domain/views/accounting.py @nospame
/corehq/apps/es/ @esoergel @amitphulera
/corehq/apps/hqcase/ @esoergel
/corehq/apps/hqwebapp/ @orangejenny @biyeun
Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Product Description
<!-- For non-invisible changes, describe user-facing effects. -->
<!-- Where applicable, describe user-facing effects and include screenshots. -->

## Technical Summary
<!--
Provide a link to the ticket or document which prompted this change,
Describe the rationale and design decisions.
Provide a link to any tickets, design documents, and/or technical specifications
associated with this change. Describe the rationale and design decisions.
-->

## Feature Flag
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@ corehq/apps/hqwebapp/static/hqwebapp/js/lib/modernizr.js
# direnv
.envrc
.direnv

# webpack build related
/webpack/_build/
3 changes: 2 additions & 1 deletion corehq/apps/accounting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ def get_domains(self):
'subscriber__domain', flat=True))

def has_enterprise_admin(self, email):
return self.is_customer_billing_account and email in self.enterprise_admin_emails
lower_emails = [e.lower() for e in self.enterprise_admin_emails]
return self.is_customer_billing_account and email.lower() in lower_emails

def update_autopay_user(self, new_user, domain):
if self.auto_pay_enabled and new_user != self.auto_pay_user:
Expand Down
7 changes: 7 additions & 0 deletions corehq/apps/accounting/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from django.core import mail
from django.db import models
from django.test import SimpleTestCase

from unittest import mock

Expand Down Expand Up @@ -343,3 +344,9 @@ def test_unset_autopay(self, fake_customer):
self.assertEqual(self.fake_card.metadata, {"auto_pay_{}".format(self.billing_account.id): 'False'})
self.assertIsNone(self.billing_account.auto_pay_user)
self.assertFalse(self.billing_account.auto_pay_enabled)


class SimpleBillingAccountTest(SimpleTestCase):
def test_has_enterprise_admin_does_case_insensitive_match(self):
account = BillingAccount(is_customer_billing_account=True, enterprise_admin_emails=['[email protected]'])
self.assertTrue(account.has_enterprise_admin('[email protected]'))
2 changes: 1 addition & 1 deletion corehq/apps/analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Their script is included in [signup](https://github.com/dimagi/commcare-hq/blob/

### Google Tag Manager (GTM)

Its script is available in the [gtm.js](https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/analytics/static/analytix/js/gtm.js) which loads the GTM tracking script and sends the desired user properties to GTM.
Its script is available in the [gtx.js](https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/analytics/static/analytix/js/gtx.js) which loads the GTM tracking script and sends the desired user properties to GTM.
Any tracking of events should be configured at the GTM console end in tandem with the desired analytics tooling. The goal is to track specific features in HQ and also disable them when there is no need via the GTM console itself.
Any `id` attribute added to html element for tracking through console should be prefixed with `gtm-` to indicate that this element is likely being tracked in GTM.
This should potentially avoid accidental removal of id attribute from these elements. (Similar approach may be followed for any tooling in case of tracking of elements through console.)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"use strict";
/**
* Handles communication with the google tag manager API.
* Handles communication with the google tag manager API.
* gtx is the filename because some ad blockers blocks 'gtm.js'*
*/
hqDefine('analytix/js/gtm', [
hqDefine('analytix/js/gtx', [
'jquery',
'underscore',
'analytix/js/initial',
Expand Down
3 changes: 2 additions & 1 deletion corehq/apps/analytics/templates/analytics/analytics_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
<script src="{% static 'analytix/js/hubspot.js' %}"></script>
<script src="{% static 'analytix/js/drift.js' %}"></script>
<script src="{% static 'analytix/js/appcues.js' %}"></script>
<script src="{% static 'analytix/js/gtm.js' %}"></script>
{# gtx is the filename because some adblockers blocks 'gtm.js' #}
<script src="{% static 'analytix/js/gtx.js' %}"></script>
{% endcompress %}
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
├─ [email protected]
│ ├─ balanced-match@^1.0.0
│ └─ [email protected]
├─ [email protected].2
│ └─ fill-range@^7.0.1
├─ [email protected].3
│ └─ fill-range@^7.1.1
├─ [email protected]
├─ [email protected]
├─ [email protected]
Expand Down Expand Up @@ -230,7 +230,7 @@
│ └─ websocket-driver@>=0.5.1
├─ [email protected]
│ └─ pend@~1.2.0
├─ fill-range@7.0.1
├─ fill-range@7.1.1
│ └─ to-regex-range@^5.0.1
├─ [email protected]
│ ├─ [email protected]
Expand Down Expand Up @@ -259,7 +259,7 @@
│ └─ parse-filepath@^1.0.1
├─ [email protected]
├─ [email protected]
├─ [email protected].5
├─ [email protected].6
├─ [email protected]
├─ [email protected]
│ └─ for-in@^1.0.1
Expand Down Expand Up @@ -978,7 +978,7 @@
│ ├─ string-width@^4.1.0
│ └─ strip-ansi@^6.0.0
├─ [email protected]
├─ [email protected].3
├─ [email protected].4
│ └─ async-limiter@~1.0.0
├─ [email protected]
├─ [email protected]
Expand Down Expand Up @@ -1006,4 +1006,4 @@
│ ├─ buffer-crc32@~0.2.3
│ └─ fd-slicer@~1.1.0
└─ [email protected]
Done in 0.29s.
Done in 0.27s.
Loading

0 comments on commit 75e7234

Please sign in to comment.