Skip to content

Extend ICommCarePreferenceManager To Support Boolean Values#1536

Closed
conroy-ricketts wants to merge 1 commit into
masterfrom
CCCT-2294-parse-relearn-tasks-for-UI-commcare-core-changes
Closed

Extend ICommCarePreferenceManager To Support Boolean Values#1536
conroy-ricketts wants to merge 1 commit into
masterfrom
CCCT-2294-parse-relearn-tasks-for-UI-commcare-core-changes

Conversation

@conroy-ricketts

@conroy-ricketts conroy-ricketts commented Apr 27, 2026

Copy link
Copy Markdown

Supports CCCT-2294

Technical Summary

I extended ICommCarePreferenceManager to support boolean variables (for use in dimagi/commcare-android#3677)

Safety Assurance

Safety story

This was dev tested successfully with the changes seen in dimagi/commcare-android#3677

Summary by CodeRabbit

  • New Features
    • Added ability to store and manage boolean settings in the preference system for enhanced configuration flexibility.

Extend ICommCarePreferenceManager to support boolean variables.
@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown

Walkthrough

The ICommCarePreferenceManager interface is extended with two new methods to support boolean value operations: putBoolean for storing boolean preferences and getBoolean for retrieving boolean preferences with a default fallback value.

Changes

Cohort / File(s) Summary
Interface Boolean Support
src/main/java/org/commcare/core/services/ICommCarePreferenceManager.java
Added two new interface methods: putBoolean(String key, boolean value) and getBoolean(String key, boolean defaultValue) to enable boolean preference storage and retrieval alongside existing long-based operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Booleans hop into the preference store,
True and false, we handle them with care,
Simple, pure, and straightforward to the core,
No complex logic floating through the air!
✨ Each method crisp and clean,
The interface now more complete than seen.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately reflects the main change: extending ICommCarePreferenceManager to support boolean values by adding putBoolean and getBoolean methods.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch CCCT-2294-parse-relearn-tasks-for-UI-commcare-core-changes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@conroy-ricketts conroy-ricketts changed the title CCCT-2294 Parse Relearn Tasks For UI Extend ICommCarePreferenceManager To Support Boolean Values Apr 27, 2026
@conroy-ricketts

Copy link
Copy Markdown
Author

Closing this as it's no longer needed for dimagi/commcare-android#3677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant