-
-
-
- {% blocktrans %}
- row had an invalid
- "" cell and was not saved
- {% endblocktrans %}
+
+
+
+
+
+
+ {% blocktrans %}
+ row had an invalid
+ "" cell and was not saved
+ {% endblocktrans %}
+
+
+ {% blocktrans %}
+ rows had invalid
+ "" cells and were not saved
+ {% endblocktrans %}
+
+
-
- {% blocktrans %}
-
rows had invalid
- "
" cells and were not saved
- {% endblocktrans %}
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
diff --git a/corehq/apps/case_search/tests/test_filter_dsl.py b/corehq/apps/case_search/tests/test_filter_dsl.py
index 5f1ecaedc0e8..99fc54566dac 100644
--- a/corehq/apps/case_search/tests/test_filter_dsl.py
+++ b/corehq/apps/case_search/tests/test_filter_dsl.py
@@ -81,14 +81,20 @@ def test_datetime_system_property_filter_optimized(self, mock_get_timezone):
@freeze_time('2023-05-16T13:01:51Z')
@flag_enabled('CASE_SEARCH_INDEXED_METADATA')
- @patch("corehq.apps.case_search.xpath_functions.comparison.get_timezone_for_domain",
- return_value=pytz.timezone('America/Los_Angeles'))
- def test_system_date_property_comparison(self, mock_get_timezone):
+ def test_system_datetime_property_comparison(self):
parsed = parse_xpath("last_modified < datetime-add(now(), 'weeks', -2)")
expected_filter = filters.date_range('modified_on', lt='2023-05-02T13:01:51+00:00')
built_filter = build_filter_from_ast(parsed, SearchFilterContext("domain"))
self.checkQuery(built_filter, expected_filter, is_raw_query=True)
+ @freeze_time('2023-05-16T13:01:51Z')
+ @flag_enabled('CASE_SEARCH_INDEXED_METADATA')
+ def test_system_datetime_property_match(self):
+ parsed = parse_xpath("last_modified = now()")
+ expected_filter = filters.term('modified_on', '2023-05-16T13:01:51+00:00')
+ built_filter = build_filter_from_ast(parsed, SearchFilterContext("domain"))
+ self.checkQuery(built_filter, expected_filter, is_raw_query=True)
+
def test_not_filter(self):
parsed = parse_xpath("not(name = 'farid')")
expected_filter = filters.NOT(case_property_query('name', 'farid'))
diff --git a/corehq/apps/case_search/xpath_functions/comparison.py b/corehq/apps/case_search/xpath_functions/comparison.py
index a5edcc57fb9c..59c3fb69a89a 100644
--- a/corehq/apps/case_search/xpath_functions/comparison.py
+++ b/corehq/apps/case_search/xpath_functions/comparison.py
@@ -126,6 +126,8 @@ def _create_system_datetime_query(domain, meta_property, op, value, node):
raise CaseFilterError(str(e), serialize(node))
if isinstance(date_or_datetime, datetime):
+ if op == EQ:
+ return filters.term(meta_property.es_field_name, value)
range_kwargs = {RANGE_OP_MAPPING[op]: date_or_datetime}
else:
timezone = get_timezone_for_domain(domain)
diff --git a/corehq/apps/cleanup/migrations/0017_delete_oauth_integrations_models.py b/corehq/apps/cleanup/migrations/0017_delete_oauth_integrations_models.py
new file mode 100644
index 000000000000..1469eaaee38a
--- /dev/null
+++ b/corehq/apps/cleanup/migrations/0017_delete_oauth_integrations_models.py
@@ -0,0 +1,50 @@
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('cleanup', '0016_add_deletedsqldoc'),
+ ]
+
+ operations = [
+ migrations.RunSQL("""
+ DROP TABLE IF EXISTS "oauth_integrations_googleapitoken" CASCADE;
+ DROP TABLE IF EXISTS "oauth_integrations_livegooglesheetrefreshstatus" CASCADE;
+ DROP TABLE IF EXISTS "oauth_integrations_livegooglesheetschedule" CASCADE;
+ """),
+ ]
+
+
+"""
+Dropped entities can be checked with the following query:
+ select pg_describe_object(classid, objid, objsubid)
+ from pg_depend
+ where refobjid in (
+ 'oauth_integrations_googleapitoken'::regclass,
+ 'oauth_integrations_livegooglesheetrefreshstatus'::regclass,
+ 'oauth_integrations_livegooglesheetschedule'::regclass
+ );
+Example output (from staging, the same as a local dev setup):
+ type oauth_integrations_livegooglesheetschedule
+ type oauth_integrations_livegooglesheetrefreshstatus
+ type oauth_integrations_googleapitoken
+ toast table pg_toast.pg_toast_2980995
+ toast table pg_toast.pg_toast_2980982
+ toast table pg_toast.pg_toast_2892669
+ sequence oauth_integrations_livegooglesheetschedule_id_seq
+ sequence oauth_integrations_livegooglesheetrefreshstatus_id_seq
+ sequence oauth_integrations_googleapitoken_id_seq
+ index oauth_integrations_livegoo_schedule_id_064aa4f4
+ index oauth_integrations_livegoo_export_config_id_200127ab
+ index oauth_integrations_liveg_export_config_id_200127ab_like
+ index oauth_integrations_googleapitoken_user_id_9d01255f
+ default value for column id of table oauth_integrations_livegooglesheetschedule
+ default value for column id of table oauth_integrations_livegooglesheetrefreshstatus
+ default value for column id of table oauth_integrations_googleapitoken
+ constraint oauth_integrations_livegooglesheetschedule_pkey on table oauth_integrations_livegooglesheetschedule
+ constraint oauth_integrations_livegooglesheetrefreshstatus_pkey on table oauth_integrations_livegooglesheetrefreshstatus
+ constraint oauth_integrations_l_schedule_id_064aa4f4_fk_oauth_int on table oauth_integrations_livegooglesheetrefreshstatus
+ constraint oauth_integrations_googleapitoken_pkey on table oauth_integrations_googleapitoken
+ constraint oauth_integrations_g_user_id_9d01255f_fk_auth_user on table oauth_integrations_googleapitoken
+"""
diff --git a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js
index 3c74c1a2906f..e13f019daf84 100644
--- a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js
+++ b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js
@@ -10,6 +10,7 @@ hqDefine("cloudcare/js/form_entry/web_form_session", [
'cloudcare/js/form_entry/utils',
'cloudcare/js/form_entry/form_ui',
'cloudcare/js/formplayer/utils/utils',
+ 'cloudcare/js/formplayer/users/models',
], function (
$,
ko,
@@ -20,7 +21,8 @@ hqDefine("cloudcare/js/form_entry/web_form_session", [
taskQueue,
formEntryUtils,
formUI,
- utils
+ utils,
+ UsersModels
) {
function WebFormSession(params) {
var self = {};
@@ -478,6 +480,7 @@ hqDefine("cloudcare/js/form_entry/web_form_session", [
};
self.changeLang = function (lang) {
+ updateDisplayOptionLang(lang);
self.serverRequest(
{
'action': constants.CHANGE_LOCALE,
@@ -623,9 +626,16 @@ hqDefine("cloudcare/js/form_entry/web_form_session", [
var urlObject = utils.currentUrlToObject();
urlObject.changeLang = lang;
menusController.selectMenu(urlObject);
+ updateDisplayOptionLang(lang);
});
}
+ function updateDisplayOptionLang(lang) {
+ var displayOptions = UsersModels.getCurrentUser().displayOptions;
+ displayOptions.language = lang;
+ UsersModels.saveDisplayOptions(displayOptions);
+ }
+
return {
WebFormSession: WebFormSession,
applyLangListener: applyLangListener,
diff --git a/corehq/apps/domain/migrations/0015_delete_projectlimit.py b/corehq/apps/domain/migrations/0015_delete_projectlimit.py
new file mode 100644
index 000000000000..63f7c46ecad8
--- /dev/null
+++ b/corehq/apps/domain/migrations/0015_delete_projectlimit.py
@@ -0,0 +1,16 @@
+# Generated by Django 4.2.16 on 2024-11-25 15:32
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('domain', '0014_appreleasemodesetting'),
+ ]
+
+ operations = [
+ migrations.DeleteModel(
+ name='ProjectLimit',
+ ),
+ ]
diff --git a/corehq/apps/domain/models.py b/corehq/apps/domain/models.py
index 29550b52f21e..73ade2f0348f 100644
--- a/corehq/apps/domain/models.py
+++ b/corehq/apps/domain/models.py
@@ -1107,20 +1107,6 @@ def disallowed_ucr_expressions(cls, domain_name):
return restricted_expressions - allowed_expressions_for_domain
-class ProjectLimitType():
- LIVE_GOOGLE_SHEETS = 'lgs'
-
- CHOICES = (
- (LIVE_GOOGLE_SHEETS, "Live Google Sheets"),
- )
-
-
-class ProjectLimit(models.Model):
- domain = models.CharField(max_length=256, db_index=True)
- limit_type = models.CharField(max_length=5, choices=ProjectLimitType.CHOICES)
- limit_value = models.IntegerField(default=20)
-
-
class OperatorCallLimitSettings(models.Model):
CALL_LIMIT_MINIMUM = 1
CALL_LIMIT_MAXIMUM = 1000
diff --git a/corehq/apps/domain/static/domain/js/internal_settings.js b/corehq/apps/domain/static/domain/js/internal_settings.js
index 200edf2fc51f..64701c565208 100644
--- a/corehq/apps/domain/static/domain/js/internal_settings.js
+++ b/corehq/apps/domain/static/domain/js/internal_settings.js
@@ -5,6 +5,7 @@ hqDefine("domain/js/internal_settings", [
'hqwebapp/js/initial_page_data',
'hqwebapp/js/multiselect_utils',
'jquery-ui/ui/widgets/datepicker',
+ 'commcarehq',
], function (
$,
ko,
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/calendar_fixture.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/calendar_fixture.html
deleted file mode 100644
index f8f7f5dc9b70..000000000000
--- a/corehq/apps/domain/templates/domain/admin/bootstrap3/calendar_fixture.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends "hqwebapp/bootstrap3/base_section.html" %}
-{% load crispy_forms_tags %}
-{% load i18n %}
-{% block page_content %}
- {% trans "Calendar Fixture Settings" %}
- {% crispy form %}
-{% endblock %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html
deleted file mode 100644
index b6222342b255..000000000000
--- a/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html
+++ /dev/null
@@ -1,155 +0,0 @@
-{% extends "hqwebapp/bootstrap3/base_section.html" %}
-{% load hq_shared_tags %}
-{% load i18n %}
-
-{% js_entry_b3 'domain/js/bootstrap3/case_search_main' %}
-
-{% block page_content %}
- {% include 'domain/admin/partials/bootstrap3/case_search_templates.html' %}
- {% initial_page_data 'case_types' case_types %}
- {% initial_page_data 'values' values %}
- {% registerurl 'case_search_config' request.domain %}
- {% trans "Enable Case Search" %}
-
-
-
-{% endblock %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/global_sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/global_sms_rates.html
index b60eba5477dc..9c30739c0247 100644
--- a/corehq/apps/domain/templates/domain/admin/bootstrap3/global_sms_rates.html
+++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/global_sms_rates.html
@@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}
-{% requirejs_main 'smsbillables/js/smsbillables.rate_calc' %}
+{% js_entry_b3 'smsbillables/js/rate_calc' %}
{% block title %}{% trans "SMS Pricing" %}{% endblock %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html
deleted file mode 100644
index c41d0d1377a8..000000000000
--- a/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "hqwebapp/bootstrap3/base_section.html" %}
-{% load hq_shared_tags %}
-
-{% block page_content %}
-
- {% initial_page_data 'domain' domain %}
-
- {% include "domain/admin/partials/bootstrap3/project_limits_table.html" %}
-
-{% endblock %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/sms_rates.html
index 9cf73ea711e5..2e520d03f6ce 100644
--- a/corehq/apps/domain/templates/domain/admin/bootstrap3/sms_rates.html
+++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/sms_rates.html
@@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}
-{% requirejs_main 'smsbillables/js/smsbillables.rate_calc' %}
+{% js_entry_b3 'smsbillables/js/rate_calc' %}
{% block page_content %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html
deleted file mode 100644
index 4a8c2cddf31f..000000000000
--- a/corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends "hqwebapp/bootstrap5/base_section.html" %}
-{% load crispy_forms_tags %}
-{% load i18n %}
-{% block page_content %}
-
{% trans "Calendar Fixture Settings" %}
- {% crispy form %} {# todo B5: crispy #}
-{% endblock %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html
index a6a16ec4bd51..e2d80da9fdc7 100644
--- a/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html
+++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html
@@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}
-{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %}
+{% js_entry 'smsbillables/js/rate_calc' %}
{% block title %}{% trans "SMS Pricing" %}{% endblock %}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html
index df9504a25988..393524df7134 100644
--- a/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html
+++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html
@@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}
-{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %}
+{% js_entry 'smsbillables/js/rate_calc' %}
{% block page_content %}
{# todo B5: css-well #}
diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html b/corehq/apps/domain/templates/domain/admin/case_search.html
similarity index 78%
rename from corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html
rename to corehq/apps/domain/templates/domain/admin/case_search.html
index 3d4cf1376ffc..99e9971a9c58 100644
--- a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html
+++ b/corehq/apps/domain/templates/domain/admin/case_search.html
@@ -5,7 +5,7 @@
{% js_entry 'domain/js/bootstrap5/case_search_main' %}
{% block page_content %}
- {% include 'domain/admin/partials/bootstrap5/case_search_templates.html' %}
+ {% include 'domain/admin/partials/case_search_templates.html' %}
{% initial_page_data 'case_types' case_types %}
{% initial_page_data 'values' values %}
{% registerurl 'case_search_config' request.domain %}
@@ -31,19 +31,23 @@
{% trans "Enable Case Search" %}
- {# todo B5: css-checkbox #}
-
+
+
+
+
{% if request.user.is_superuser %}
-
+
{% blocktrans %}
Visit
Case Search to test out your configuration.
{% endblocktrans %}
{% endif %}
-
+
{% trans "Fuzzy Search Properties" %}
{% blocktrans %}
@@ -67,15 +71,17 @@
{% trans "Fuzzy Search Properties" %}
-
+
-
+
-
+
{% trans "Remove Special Characters" %}
{% blocktrans %}
diff --git a/corehq/apps/domain/templates/domain/admin/partials/bootstrap3/case_search_templates.html b/corehq/apps/domain/templates/domain/admin/partials/bootstrap3/case_search_templates.html
deleted file mode 100644
index 01d747a182f5..000000000000
--- a/corehq/apps/domain/templates/domain/admin/partials/bootstrap3/case_search_templates.html
+++ /dev/null
@@ -1,37 +0,0 @@
-{% load i18n %}
-
-
-
-
-
-
-
-
-
-
-
- {% trans "Case type" %}
-
-
-
-
-
-
-
-
-
-
diff --git a/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html b/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html
index 6cb3dcc1263e..e5f0426735e1 100644
--- a/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html
+++ b/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html
@@ -23,8 +23,8 @@
{{ header }}
{{ rate_info.key }} |
{{ rate_info.percent_usage }}%
- {# todo B5: css-progress #}
- {# todo B5: inline-style #}
+
|
{{ rate_info.current_usage }} |
diff --git a/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html b/corehq/apps/domain/templates/domain/admin/partials/case_search_templates.html
similarity index 51%
rename from corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html
rename to corehq/apps/domain/templates/domain/admin/partials/case_search_templates.html
index 7e5eb3531828..9c0d2b9ac42e 100644
--- a/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html
+++ b/corehq/apps/domain/templates/domain/admin/partials/case_search_templates.html
@@ -1,29 +1,36 @@
{% load i18n %}