Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Validate search scope when scheduled event created [DHIS2-17335] #19457

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

muilpp
Copy link
Contributor

@muilpp muilpp commented Dec 12, 2024

We currently validate the capture scope when creating an event. This works for ACTIVE and COMPLETED events. However, for SCHEDULE events, it should also be possible to create them using the user's search scope. This PR addresses that issue.

@muilpp muilpp force-pushed the DHIS2-17335-validate-search-scope-scheduled-event branch from 43a1a6f to c44e588 Compare December 12, 2024 13:32
@muilpp muilpp marked this pull request as ready for review December 12, 2024 13:34
@muilpp muilpp requested a review from a team as a code owner December 12, 2024 13:34
Comment on lines 2 to 32
"importMode": "COMMIT",
"idSchemes": {
"dataElementIdScheme": {
"idScheme": "UID"
},
"orgUnitIdScheme": {
"idScheme": "UID"
},
"programIdScheme": {
"idScheme": "UID"
},
"programStageIdScheme": {
"idScheme": "UID"
},
"idScheme": {
"idScheme": "UID"
},
"categoryOptionComboIdScheme": {
"idScheme": "UID"
},
"categoryOptionIdScheme": {
"idScheme": "UID"
}
},
"importStrategy": "CREATE",
"atomicMode": "ALL",
"flushMode": "AUTO",
"validationMode": "FULL",
"skipPatternValidation": false,
"skipSideEffects": false,
"skipRuleEngine": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"importMode": "COMMIT",
"idSchemes": {
"dataElementIdScheme": {
"idScheme": "UID"
},
"orgUnitIdScheme": {
"idScheme": "UID"
},
"programIdScheme": {
"idScheme": "UID"
},
"programStageIdScheme": {
"idScheme": "UID"
},
"idScheme": {
"idScheme": "UID"
},
"categoryOptionComboIdScheme": {
"idScheme": "UID"
},
"categoryOptionIdScheme": {
"idScheme": "UID"
}
},
"importStrategy": "CREATE",
"atomicMode": "ALL",
"flushMode": "AUTO",
"validationMode": "FULL",
"skipPatternValidation": false,
"skipSideEffects": false,
"skipRuleEngine": false,

}
],
"relationships": [],
"username": "system-process"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"username": "system-process"

@muilpp muilpp requested a review from ameenhere December 12, 2024 14:04
Copy link

sonarcloud bot commented Dec 12, 2024

@muilpp muilpp merged commit 9bc09bf into master Dec 13, 2024
17 checks passed
@muilpp muilpp deleted the DHIS2-17335-validate-search-scope-scheduled-event branch December 13, 2024 08:30
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.

3 participants