Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
56713d0
feat: add basic information
henrikmv Jan 29, 2026
de4aaaf
feat: add expression section to program rule form
henrikmv Feb 2, 2026
f37f124
feat: action management and validation
henrikmv Feb 2, 2026
f6261d5
feat: temp
henrikmv Feb 3, 2026
fcc40ff
feat: enhance program rule form with validation and action management…
henrikmv Feb 3, 2026
b55a40d
feat: update dependencies and remove data element only
henrikmv Feb 4, 2026
e82a4c8
feat: add new constants
henrikmv Feb 4, 2026
0d72139
fix: sonar qube
henrikmv Feb 4, 2026
20dc559
fix: more sonar cube
henrikmv Feb 4, 2026
6d911e4
Merge branch 'master' into hv/feat/DHIS2-20784_ProgramRuleForm
henrikmv Feb 4, 2026
ef61e1f
fix: sonar qube last errors
henrikmv Feb 4, 2026
d166120
fix: sonar qube for edit
henrikmv Feb 4, 2026
3cc6a6c
feat: use ai to simplify complicated action modal
henrikmv Feb 4, 2026
4f9e4c1
fix: sonar qube after latest changes
henrikmv Feb 4, 2026
bd1494b
fix: action modal css
henrikmv Feb 4, 2026
f2740ad
feat: add validation and constants for program rule actions
henrikmv Feb 5, 2026
a057239
feat: temp
henrikmv Feb 5, 2026
79eecf3
fix: validation temp
henrikmv Feb 6, 2026
d0b74b0
feat: add program rule action priority feature support
henrikmv Feb 6, 2026
0d26fe5
fix: validation
henrikmv Feb 6, 2026
e3eea0e
feat: styling
henrikmv Feb 6, 2026
0621543
fix: sonar qube
henrikmv Feb 6, 2026
e0b5b46
fix: more sonar qube
henrikmv Feb 6, 2026
010c538
fix: css
henrikmv Feb 6, 2026
6c9e2cc
feat: temp
henrikmv Feb 6, 2026
3dfad41
Merge branch 'master' into hv/feat/DHIS2-20784_ProgramRuleForm
henrikmv Feb 6, 2026
ed0a5f6
feat: clean up
henrikmv Feb 9, 2026
9aecce0
feat: refactor program rule form actions and validation fields
henrikmv Feb 9, 2026
4419769
refactor: update program rule fields
henrikmv Feb 9, 2026
62a8457
feat: temp
henrikmv Feb 9, 2026
97a0952
feat: clean up edit
henrikmv Feb 9, 2026
86bcc58
feat: enhance program rule form actions with new components and valid…
henrikmv Feb 10, 2026
6b6ad67
feat: temp
henrikmv Feb 10, 2026
c587008
fix: sonar qube
henrikmv Feb 10, 2026
2be9ac6
Merge branch 'master' into hv/feat/DHIS2-20784_ProgramRuleForm
henrikmv Feb 10, 2026
307288d
feat: github review
henrikmv Feb 10, 2026
fffd8d7
Merge branch 'master' into hv/feat/DHIS2-20784_ProgramRuleForm
henrikmv Feb 11, 2026
d871cc4
fix: review
henrikmv Feb 11, 2026
c985358
feat: clean up
henrikmv Feb 11, 2026
0c97ed4
fix: simplify label translation code and update access schema in prog…
henrikmv Feb 12, 2026
a43c044
fix: ac regression for porgram rule action
henrikmv Feb 12, 2026
849ada5
fix: add partial to access
henrikmv Feb 12, 2026
eb64a38
fix: remove code to keep reference
henrikmv Feb 12, 2026
7be77d8
feat: program rule action forms with patching and improved submission…
henrikmv Feb 12, 2026
d7c4435
feat: remove createevent and add scheduleevent
henrikmv Feb 12, 2026
1045731
fix: review
henrikmv Feb 12, 2026
dd9ea52
fix: sonar qube and missing variables
henrikmv Feb 13, 2026
541c7c5
fix: update logical operators
henrikmv Feb 13, 2026
921487b
fix: update translation for schedule event label in program rules
henrikmv Feb 13, 2026
f8cb48a
feat: add event count variable and enhance program rule action transf…
henrikmv Feb 13, 2026
ef4d2bc
fix: bug missing displayname
henrikmv Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 240 additions & 3 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ msgstr "Program stage data"
msgid "Attributes"
msgstr "Attributes"

msgid "Program rule variables"
msgstr "Program rule variables"

msgid "Functions"
msgstr "Functions"

msgid "Could not validate expression"
msgstr "Could not validate expression"

Expand Down Expand Up @@ -1238,9 +1244,6 @@ msgstr "Program rules"
msgid "Program rule variable"
msgstr "Program rule variable"

msgid "Program rule variables"
msgstr "Program rule variables"

msgid "Program stage"
msgstr "Program stage"

Expand Down Expand Up @@ -4412,6 +4415,240 @@ msgstr ""
msgid "Program Rule Variable"
msgstr "Program Rule Variable"

msgid "Edit condition expression"
msgstr "Edit condition expression"

msgid "Set up condition expression"
msgstr "Set up condition expression"

msgid "Feedback"
msgstr "Feedback"

msgid "Display widget"
msgstr "Display widget"

msgid "Can be 0 or negative. Leave empty if not needed."
msgstr "Can be 0 or negative. Leave empty if not needed."

msgid "Program rule variable to assign to"
msgstr "Program rule variable to assign to"

msgid "Program stages to trigger rule"
msgstr "Program stages to trigger rule"

msgid "All program stages"
msgstr "All program stages"

msgid ""
"Select a specific program stage or leave as \"All program stages\" to "
"trigger on all stages."
msgstr ""
"Select a specific program stage or leave as \"All program stages\" to "
"trigger on all stages."

msgid "Program stage section to hide"
msgstr "Program stage section to hide"

msgid "Set up the basic information for this program rule."
msgstr "Set up the basic information for this program rule."

msgid "Only used for managing metadata, not shown with rule output"
msgstr "Only used for managing metadata, not shown with rule output"

msgid "Explain the purpose of this program rule. Not shown with rule output."
msgstr "Explain the purpose of this program rule. Not shown with rule output."

msgid "Set up the expression that checks when this program rule runs."
msgstr "Set up the expression that checks when this program rule runs."

msgid "Edit action"
msgstr "Edit action"

msgid "Add action"
msgstr "Add action"

msgid "Configure the program rule action."
msgstr "Configure the program rule action."

msgid "Action type"
msgstr "Action type"

msgid "Save action"
msgstr "Save action"

msgid "Set up the actions that happen when the program rule runs."
msgstr "Set up the actions that happen when the program rule runs."

msgid "Action will be deleted when the program rule is saved."
msgstr "Action will be deleted when the program rule is saved."

msgid "Undo delete"
msgstr "Undo delete"

msgid "Program rule must be saved before actions can be added"
msgstr "Program rule must be saved before actions can be added"

msgid "Data element to assign to"
msgstr "Data element to assign to"

msgid "Tracked entity attribute to assign to"
msgstr "Tracked entity attribute to assign to"

msgid "Expression to evaluate and assign."
msgstr "Expression to evaluate and assign."

msgid "Data element to display warning next to"
msgstr "Data element to display warning next to"

msgid "Data element to display error next to"
msgstr "Data element to display error next to"

msgid "Tracked entity attribute to display warning next to"
msgstr "Tracked entity attribute to display warning next to"

msgid "Tracked entity attribute to display error next to"
msgstr "Tracked entity attribute to display error next to"

msgid "Static text"
msgstr "Static text"

msgid "Expression to evaluate and display after static text."
msgstr "Expression to evaluate and display after static text."

msgid "Key label"
msgstr "Key label"

msgid "Expression to evaluate and display as value."
msgstr "Expression to evaluate and display as value."

msgid "Data element to hide"
msgstr "Data element to hide"

msgid "Tracked entity attribute to hide"
msgstr "Tracked entity attribute to hide"

msgid "Custom message for blanked field"
msgstr "Custom message for blanked field"

msgid "Option to hide"
msgstr "Option to hide"

msgid "Option group to hide"
msgstr "Option group to hide"

msgid "Date to send message."
msgstr "Date to send message."

msgid "Option group to show"
msgstr "Option group to show"

msgid "Assign value"
msgstr "Assign value"

msgid "Create event"
msgstr "Create event"

msgid "Display key-value pair"
msgstr "Display key-value pair"

msgid "Display text"
msgstr "Display text"

msgid "Error on complete"
msgstr "Error on complete"

msgid "Hide field"
msgstr "Hide field"

msgid "Hide option"
msgstr "Hide option"

msgid "Hide option group"
msgstr "Hide option group"

msgid "Hide program stage"
msgstr "Hide program stage"

msgid "Hide section"
msgstr "Hide section"

msgid "Schedule message"
msgstr "Schedule message"

msgid "Send message"
msgstr "Send message"

msgid "Set mandatory field"
msgstr "Set mandatory field"

msgid "Show error"
msgstr "Show error"

msgid "Show option group"
msgstr "Show option group"

msgid "Show warning"
msgstr "Show warning"

msgid "Warning on complete"
msgstr "Warning on complete"

msgid "Expression to evaluate and assign is required"
msgstr "Expression to evaluate and assign is required"

msgid ""
"At least one of the data element, tracked entity attribute, or program rule "
"variable must be provided"
msgstr ""
"At least one of the data element, tracked entity attribute, or program rule "
"variable must be provided"

msgid "Display widget is required"
msgstr "Display widget is required"

msgid "This field is required"
msgstr "This field is required"

msgid ""
"At least one of the data element or tracked entity attribute must be "
"provided"
msgstr ""
"At least one of the data element or tracked entity attribute must be "
"provided"

msgid "Program stage is required"
msgstr "Program stage is required"

msgid "Program stage section to hide is required"
msgstr "Program stage section to hide is required"

msgid "Select a data element or tracked entity attribute with option set"
msgstr "Select a data element or tracked entity attribute with option set"

msgid "Option to hide is required"
msgstr "Option to hide is required"

msgid "Key label is required"
msgstr "Key label is required"

msgid "Message template is required"
msgstr "Message template is required"

msgid "Option group is required"
msgstr "Option group is required"

msgid "Static text is required"
msgstr "Static text is required"

msgid "Unknown action type"
msgstr "Unknown action type"

msgid "Program Rule"
msgstr "Program Rule"

msgid "Name (required)"
msgstr "Name (required)"

msgid "There was an error deleting stages: {{stagesNames}}"
msgstr "There was an error deleting stages: {{stagesNames}}"

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"whatwg-fetch": "^3.6.17"
},
"dependencies": {
"@dhis2/app-runtime": "3.15.1",
"@dhis2/app-runtime": "3.16.0",
"@dhis2/multi-calendar-dates": "^2.1.2",
"@dhis2/ui": "^10.11.0",
"@tanstack/react-query": "4",
Expand All @@ -62,6 +62,6 @@
},
"resolutions": {
"@dhis2/ui": "^10.11.0",
"@dhis2/app-runtime": "3.15.1"
"@dhis2/app-runtime": "3.16.0"
}
}
6 changes: 4 additions & 2 deletions src/components/ExpressionBuilder/ExpressionBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ export const ExpressionBuilder = ({
const { input: expressionInput } = useField(fieldName)
const expressionRef = useRef<HTMLTextAreaElement>(null)

const [validate, validating, validatedValue] =
useExpressionValidator(validationResource)
const [validate, validating, validatedValue] = useExpressionValidator(
validationResource,
programId
)
const [validationResponse, setValidationResponse] =
useState<ValidationResult | null>(null)
const [isEmpty, setIsEmpty] = useState<boolean>(false)
Expand Down
6 changes: 4 additions & 2 deletions src/components/ExpressionBuilder/ExpressionBuilderEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ export const ExpressionBuilderEntry = ({
}: ExpressionBuilderEntryProps) => {
const [showExpressionBuilder, setShowExpressionBuilder] = useState(false)

const [initialExpressionValidation] =
useExpressionValidator(validationResource)
const [initialExpressionValidation] = useExpressionValidator(
validationResource,
programId
)
const [expressionDescription, setExpressionDescription] = useState<
string | undefined
>(undefined)
Expand Down
Loading
Loading