feat(#10240): allow limit_count_to_goal in target configuration schema#800
Open
cliftonmcintosh wants to merge 2 commits intomedic:mainfrom
Open
feat(#10240): allow limit_count_to_goal in target configuration schema#800cliftonmcintosh wants to merge 2 commits intomedic:mainfrom
cliftonmcintosh wants to merge 2 commits intomedic:mainfrom
Conversation
Add limit_count_to_goal as an optional boolean field to the Joi schema for declarative targets, matching the new field added in cht-core that caps the displayed count at the goal value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
This is to go with medic/cht-core#10772 |
7 tasks
dianabarsan
approved these changes
Apr 3, 2026
| .optional() | ||
| .error(targetError('idType should be either "report" or "contact" or "function(contact, report)"')), | ||
| aggregate: joi.boolean().optional(), | ||
| limit_count_to_goal: joi.boolean().optional(), |
Member
There was a problem hiding this comment.
I think this property name is quite verbose. I would rather keep it shorter like limit_count or max_count, but this is not very important.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
limit_count_to_goalas an optional boolean field to the Joi schema for declarative targets, matching the new field added in cht-core that caps the displayed count at the goal value.Description
Adds
limit_count_to_goalas an optional boolean field to the declarative target Joi validation schema, and includes it in the compiled target output.This is a companion to medic/cht-core#10772, which introduces the
limit_count_to_goalfield to cht-core. The underlying issue is tracked in cht-core as medic/cht-core#10240.Code review items
AI Disclosure
Claude Code was used to locate the correct place in the schema, add the field, and run the test suite to verify nothing was broken.
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.