Skip to content

Commit 6f34a21

Browse files
MartinRieseclaude
andcommitted
Remove search_again_label functionality
With SSCS (Split Screen Case Search) now the default behavior, the search_again_label is no longer needed. This removes all references to search_again_label and CaseSearchAgainLabel throughout the codebase. Changes: - Remove CaseSearchAgainLabel class and search_again_label/again_label properties from CaseSearch model - Remove search_again_label from views (GET/POST endpoints, media handling) - Remove search_again_label locale string generation - Remove search_again_label from media collection and renaming - Remove search_again_label from translation upload/download modules - Remove search_again_label from JavaScript (case_claim.js) - Update test fixtures and assertions to no longer expect search_again functionality - Clean up test data (plant_care_app.json) The search_again_label was previously used to provide a "Search Again" button on search results, but with SSCS this is no longer generated. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent a0f75b7 commit 6f34a21

File tree

18 files changed

+14
-239
lines changed

18 files changed

+14
-239
lines changed

corehq/apps/app_manager/app_strings.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -401,26 +401,6 @@ def _create_case_search_app_strings(
401401
id_strings.case_search_description_locale(module),
402402
clean_trans(module.search_config.description, langs)
403403
)
404-
405-
# search again label
406-
yield (
407-
id_strings.case_search_again_locale(module),
408-
clean_trans(module.search_config.search_again_label.label, langs)
409-
)
410-
icon = module.search_config.search_again_label.icon_app_string(
411-
lang,
412-
for_default,
413-
build_profile_id,
414-
)
415-
if icon:
416-
yield id_strings.case_search_again_icon_locale(module), icon
417-
audio = module.search_config.search_again_label.audio_app_string(
418-
lang,
419-
for_default,
420-
build_profile_id,
421-
)
422-
if audio:
423-
yield id_strings.case_search_again_audio_locale(module), audio
424404
else:
425405
yield (
426406
id_strings.case_search_title_translation(module),
@@ -434,10 +414,6 @@ def _create_case_search_app_strings(
434414
id_strings.case_search_locale(module),
435415
clean_trans(CaseSearch.search_label.default().label, langs)
436416
)
437-
yield (
438-
id_strings.case_search_again_locale(module),
439-
clean_trans(CaseSearch.search_again_label.default().label, langs)
440-
)
441417

442418
for prop in module.search_config.properties:
443419
yield (

corehq/apps/app_manager/models.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,18 +2573,17 @@ class CaseSearchLabel(BaseCaseSearchLabel):
25732573
label = LabelProperty(default={'en': 'Search All Cases'})
25742574

25752575

2576-
class CaseSearchAgainLabel(BaseCaseSearchLabel):
2577-
label = LabelProperty(default={'en': 'Search Again'})
2578-
2579-
25802576
class CaseSearch(DocumentSchema):
25812577
"""
25822578
Properties and search command label
2579+
2580+
Removed fields (do not reuse):
2581+
- again_label: Removed with SSCS migration (Feb 2026)
2582+
- search_again_label: Removed with SSCS migration (Feb 2026)
2583+
These fields may still exist in CouchDB documents but are no longer used.
25832584
"""
25842585
command_label = LabelProperty(default={'en': 'Search All Cases'})
2585-
again_label = LabelProperty(default={'en': 'Search Again'})
25862586
search_label = SchemaProperty(CaseSearchLabel)
2587-
search_again_label = SchemaProperty(CaseSearchAgainLabel)
25882587
properties = SchemaListProperty(CaseSearchProperty)
25892588
auto_launch = BooleanProperty(default=False) # if true, skip the casedb case list
25902589
default_search = BooleanProperty(default=False) # if true, skip the search fields screen
@@ -2744,7 +2743,6 @@ def assign_references(self):
27442743
self.case_list_form._module = self
27452744
if hasattr(self, 'search_config'):
27462745
self.search_config.search_label._module = self
2747-
self.search_config.search_again_label._module = self
27482746
self.search_config.title_label._module = self
27492747
self.search_config.description._module = self
27502748

corehq/apps/app_manager/static/app_manager/js/details/case_claim.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ var additionalRegistryCaseModel = function (xpath, saveButton) {
203203
};
204204

205205
var searchConfigKeys = [
206-
'auto_launch', 'blacklisted_owner_ids_expression', 'default_search', 'search_again_label',
206+
'auto_launch', 'blacklisted_owner_ids_expression', 'default_search',
207207
'title_label', 'description', 'search_button_display_condition', 'search_label', 'search_filter',
208208
'additional_relevant', 'data_registry', 'data_registry_workflow', 'additional_registry_cases',
209209
'custom_related_case_property', 'inline_search', 'instance_name', 'include_all_related_cases',
@@ -213,7 +213,6 @@ var searchConfigModel = function (options, lang, searchFilterObservable, saveBut
213213
assertProperties.assertRequired(options, searchConfigKeys);
214214

215215
options.search_label = options.search_label[lang] || "";
216-
options.search_again_label = options.search_again_label[lang] || "";
217216
options.title_label = options.title_label[lang] || "";
218217
options.description = options.description[lang] || "";
219218
var mapping = {
@@ -300,7 +299,7 @@ var searchConfigModel = function (options, lang, searchFilterObservable, saveBut
300299
self.serialize = function () {
301300
var data = ko.mapping.toJS(self);
302301
data.additional_registry_cases = data.data_registry_workflow === "load_case" ? _.pluck(data.additional_registry_cases, 'caseIdXpath') : [];
303-
_.each(['search_label', 'search_again_label'], function (label) {
302+
_.each(['search_label'], function (label) {
304303
_.each(['image', 'audio'], function (media) {
305304
var key = label + "_" + media,
306305
selector = "#case_search-" + label + "_media_media_" + media + " input[type='hidden']";

corehq/apps/app_manager/suite_xml/sections/details.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -398,30 +398,24 @@ def get_case_search_action(module, build_profile_id, detail_id):
398398
in_search = module_loads_registry_case(module) or "search" in detail_id
399399

400400
# don't add search again action in split screen
401-
if in_search and toggles.SPLIT_SCREEN_CASE_SEARCH.enabled(module.get_app().domain):
401+
if in_search:
402402
return None
403403

404404
action_kwargs = DetailContributor._get_action_kwargs(module, in_search)
405-
if in_search:
406-
search_label = module.search_config.search_again_label
407-
else:
408-
search_label = module.search_config.search_label
409405

406+
search_label = module.search_config.search_label
410407
if module.get_app().enable_localized_menu_media:
411408
action = LocalizedAction(
412409
menu_locale_id=(
413-
id_strings.case_search_again_locale(module) if in_search
414-
else id_strings.case_search_locale(module)
410+
id_strings.case_search_locale(module)
415411
),
416412
media_image=search_label.uses_image(build_profile_id=build_profile_id),
417413
media_audio=search_label.uses_audio(build_profile_id=build_profile_id),
418414
image_locale_id=(
419-
id_strings.case_search_again_icon_locale(module) if in_search
420-
else id_strings.case_search_icon_locale(module)
415+
id_strings.case_search_icon_locale(module)
421416
),
422417
audio_locale_id=(
423-
id_strings.case_search_again_audio_locale(module) if in_search
424-
else id_strings.case_search_audio_locale(module)
418+
id_strings.case_search_audio_locale(module)
425419
),
426420
stack=Stack(),
427421
for_action_menu=True,
@@ -431,8 +425,7 @@ def get_case_search_action(module, build_profile_id, detail_id):
431425
action = Action(
432426
display=Display(
433427
text=Text(locale_id=(
434-
id_strings.case_search_again_locale(module) if in_search
435-
else id_strings.case_search_locale(module)
428+
id_strings.case_search_locale(module)
436429
)),
437430
media_image=search_label.default_media_image,
438431
media_audio=search_label.default_media_audio

corehq/apps/app_manager/templates/app_manager/partials/modules/bootstrap3/case_search_properties.html

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -337,35 +337,6 @@ <h4 class="panel-title panel-title-nolink">
337337
{% include "app_manager/partials/bootstrap3/nav_menu_media.html" with qualifier='case_search-search_label_media_' ICON_LABEL="Search Icon" AUDIO_LABEL="Search Audio" %}
338338
<!-- /ko -->
339339
</div>
340-
{% if not request|toggle_enabled:'SPLIT_SCREEN_CASE_SEARCH' %}
341-
<div class="form-group" data-bind="hidden: inlineSearchActive">
342-
<label
343-
for="search_again_label"
344-
class="{% css_label_class %} control-label"
345-
>
346-
{% trans "Label for Searching Again" %}
347-
<span
348-
class="hq-help-template"
349-
data-title="{% trans "Label for Searching Again" %}"
350-
data-content="{% trans_html_attr "This text is for the search button displayed at the bottom of search results, so users can search again." %}"
351-
>
352-
</span>
353-
</label>
354-
<div class="{% css_field_class %}">
355-
{% input_trans module.search_config.search_again_label.label langs input_name='search_again_label' input_id='search_again_label' data_bind="value: search_again_label" %}
356-
</div>
357-
</div>
358-
<div
359-
class="case-search-multimedia-input"
360-
data-bind="hidden: inlineSearchActive"
361-
>
362-
<!-- stopBinding to avoid conflicts with the binding of enclosing template to a different object 'search'-->
363-
<!-- binding for this partial is done via app_manager/js/nav_menu_media-->
364-
<!-- ko stopBinding: true -->
365-
{% include "app_manager/partials/bootstrap3/nav_menu_media.html" with qualifier='case_search-search_again_label_media_' ICON_LABEL="Search Again Icon" AUDIO_LABEL="Search Again Audio" %}
366-
<!-- /ko -->
367-
</div>
368-
{% endif %}
369340
<div class="form-group">
370341
<label
371342
for="search_screen_title"

corehq/apps/app_manager/templates/app_manager/partials/modules/bootstrap5/case_search_properties.html

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -337,35 +337,6 @@ <h4 class="card-title card-title-nolink">
337337
{% include "app_manager/partials/bootstrap5/nav_menu_media.html" with qualifier='case_search-search_label_media_' ICON_LABEL="Search Icon" AUDIO_LABEL="Search Audio" %}
338338
<!-- /ko -->
339339
</div>
340-
{% if not request|toggle_enabled:'SPLIT_SCREEN_CASE_SEARCH' %}
341-
<div class="form-group" data-bind="hidden: inlineSearchActive"> {# todo B5: css-form-group #}
342-
<label
343-
for="search_again_label"
344-
class="{% css_label_class %} form-label"
345-
>
346-
{% trans "Label for Searching Again" %}
347-
<span
348-
class="hq-help-template"
349-
data-title="{% trans "Label for Searching Again" %}"
350-
data-content="{% trans_html_attr "This text is for the search button displayed at the bottom of search results, so users can search again." %}"
351-
>
352-
</span>
353-
</label>
354-
<div class="{% css_field_class %}">
355-
{% input_trans module.search_config.search_again_label.label langs input_name='search_again_label' input_id='search_again_label' data_bind="value: search_again_label" %}
356-
</div>
357-
</div>
358-
<div
359-
class="case-search-multimedia-input"
360-
data-bind="hidden: inlineSearchActive"
361-
>
362-
<!-- stopBinding to avoid conflicts with the binding of enclosing template to a different object 'search'-->
363-
<!-- binding for this partial is done via app_manager/js/nav_menu_media-->
364-
<!-- ko stopBinding: true -->
365-
{% include "app_manager/partials/bootstrap5/nav_menu_media.html" with qualifier='case_search-search_again_label_media_' ICON_LABEL="Search Again Icon" AUDIO_LABEL="Search Again Audio" %}
366-
<!-- /ko -->
367-
</div>
368-
{% endif %}
369340
<div class="form-group"> {# todo B5: css-form-group #}
370341
<label
371342
for="search_screen_title"

corehq/apps/app_manager/tests/app_factory.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ def case_claim_app_factory(cls):
228228
case_module.search_config.search_label.label = {
229229
'en': 'Find a Mother',
230230
}
231-
case_module.search_config.search_again_label.label = {
232-
'en': 'Find Another Mother',
233-
}
234231
case_module.search_config.title_label = {
235232
'en': 'Find a Mom',
236233
}

corehq/apps/app_manager/tests/data/suite/search_command_detail.xml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,6 @@
182182
</text>
183183
</template>
184184
</field>
185-
<action auto_launch="false()" redo_last="true">
186-
<display>
187-
<text>
188-
<locale id="case_search.m0.again"/>
189-
</text>
190-
</display>
191-
<stack>
192-
<push>
193-
<mark/>
194-
<command value="'search_command.m0'"/>
195-
</push>
196-
</stack>
197-
</action>
198185
</detail>
199186
<detail id="m0_search_long">
200187
<title>
@@ -310,19 +297,6 @@
310297
</text>
311298
</sort>
312299
</field>
313-
<action auto_launch="false()" redo_last="true">
314-
<display>
315-
<text>
316-
<locale id="case_search.m1.again"/>
317-
</text>
318-
</display>
319-
<stack>
320-
<push>
321-
<mark/>
322-
<command value="'search_command.m1'"/>
323-
</push>
324-
</stack>
325-
</action>
326300
</detail>
327301
<detail id="m1_search_long">
328302
<title>

corehq/apps/app_manager/tests/test_app_strings.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
Application,
1515
BuildProfile,
1616
CaseSearch,
17-
CaseSearchAgainLabel,
1817
CaseSearchLabel,
1918
CaseSearchProperty,
2019
MappingItem,
@@ -175,9 +174,6 @@ def test_modules_case_search_app_strings(self):
175174
},
176175
media_audio={'en': "jr://file/commcare/image/2.mp3"}
177176
),
178-
search_again_label=CaseSearchAgainLabel(
179-
label={'en': 'Get them all'}
180-
),
181177
properties=[
182178
CaseSearchProperty(is_group=True, name='group_header_0',
183179
group_key='group_header_0', label={'en': 'Personal Information'}),
@@ -192,30 +188,26 @@ def test_modules_case_search_app_strings(self):
192188
self.assertEqual(app.default_language, 'en')
193189
en_app_strings = self._generate_app_strings(app, 'default', build_profile_id='en')
194190
self.assertEqual(en_app_strings['case_search.m0'], 'Search All Cases')
195-
self.assertEqual(en_app_strings['case_search.m0.again'], 'Search Again')
196191
self.assertFalse('case_search.m0.icon' in en_app_strings)
197192
self.assertFalse('case_search.m0.audio' in en_app_strings)
198193

199194
# non-default language
200195
es_app_strings = self._generate_app_strings(app, 'es', build_profile_id='es')
201196
self.assertEqual(es_app_strings['case_search.m0'], 'Search All Cases')
202-
self.assertEqual(es_app_strings['case_search.m0.again'], 'Search Again')
203197

204198
with flag_enabled('USH_CASE_CLAIM_UPDATES'):
205199
# default language
206200
en_app_strings = self._generate_app_strings(app, 'default', build_profile_id='en')
207201
self.assertEqual(en_app_strings['case_search.m0'], 'Get them')
208202
self.assertEqual(en_app_strings['case_search.m0.icon'], 'jr://file/commcare/image/1.png')
209203
self.assertEqual(en_app_strings['case_search.m0.audio'], 'jr://file/commcare/image/2.mp3')
210-
self.assertEqual(en_app_strings['case_search.m0.again'], 'Get them all')
211204
self.assertEqual(en_app_strings['search_property.m0.name'], 'Name')
212205
self.assertEqual(en_app_strings['search_property.m0.group_header_0'], 'Personal Information')
213206

214207
# non-default language
215208
es_app_strings = self._generate_app_strings(app, 'es', build_profile_id='es')
216209
self.assertEqual(es_app_strings['case_search.m0'], 'Conseguirlos')
217210
self.assertEqual(es_app_strings['case_search.m0.icon'], 'jr://file/commcare/image/1_es.png')
218-
self.assertEqual(es_app_strings['case_search.m0.again'], 'Get them all')
219211

220212
def test_dependencies_app_strings(self):
221213
app_id = 'callout.commcare.org.sendussd'

corehq/apps/app_manager/tests/test_suite.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from corehq.apps.app_manager.models import (
77
Application,
88
CaseSearch,
9-
CaseSearchAgainLabel,
109
CaseSearchLabel,
1110
CaseSearchProperty,
1211
DetailColumn,
@@ -47,10 +46,6 @@ def test_case_search_action(self):
4746
media_image={'en': "jr://file/commcare/image/1.png"},
4847
media_audio={'en': "jr://file/commcare/image/2.mp3"}
4948
),
50-
search_again_label=CaseSearchAgainLabel(
51-
label={'en': 'Get them'},
52-
media_audio={'en': "jr://file/commcare/image/2.mp3"}
53-
),
5449
properties=[CaseSearchProperty(name='name', label={'en': 'Name'})],
5550
)
5651
# wrap to have assign_references called
@@ -62,11 +57,6 @@ def test_case_search_action(self):
6257
app.create_suite(),
6358
"./detail[@id='m0_case_short']/action"
6459
)
65-
self.assertXmlPartialEqual(
66-
self.get_xml('case-search-again-with-action'),
67-
app.create_suite(),
68-
"./detail[@id='m0_search_short']/action"
69-
)
7060

7161
# test for localized action node for apps with CC version > 2.21
7262
app.build_spec.version = '2.21.0'
@@ -75,11 +65,6 @@ def test_case_search_action(self):
7565
app.create_suite(),
7666
"./detail[@id='m0_case_short']/action"
7767
)
78-
self.assertXmlPartialEqual(
79-
self.get_xml('case-search-again-with-localized-action'),
80-
app.create_suite(),
81-
"./detail[@id='m0_search_short']/action"
82-
)
8368

8469
def test_callcenter_suite(self, *args):
8570
self._test_generic_suite('call-center')

0 commit comments

Comments
 (0)