- Python 3 (maybe 3.6+)
- RENAME credentials-template.ini to credentials.ini and FILL IN with your information
- Watch out!!! the server url MUST follow the pattern "http://SERVER_DOMAIN/api/" (including the trailing slash)
- Select the credentials that you want to use. There are 2 options:
- Use the command line argument
-c
OR--credentials
to be able to pass the credentials you want to use. - Edit
utils.py
and change the fixed value ofargs.credentials_name
from"credentials_myserver"
to the desired one.
- Use the command line argument
- Run the script
- Check the log file
(2.37 or above) This script checks the userRoles without any authority associated, the authorities that are declared but there are not used by any userRole, and the authorities used by a userRole that are not declared.
This script checks if custom form is present in a program, a program stage or a dataset (there shouldn't be custom forms in packages and there must not be empty custom forms in packages)
This script checks if a data element is NOT associated with any dataSet (i.e. search for dataElements).
This script checks if the data elements associated to a program stage are used in the program stage instance.
This script checks if the aggregation type of the data elements are inline with the expected values.
This script checks if resource_types the resource "reportTables", "eventReports", "eventCharts", "dashboards", "maps" and "visualizations" (> 2.33) returns a HTTP code 500.
This script checks the existence of a description for a particular subset of resource types: programs, dataSets, dataElements, trackedEntityAttributes, trackedEntityTypes, indicators, programIndicators, validationRules, predictors, programRules, visualizations (event chart, event report, map, data visualizer), dashboards
This scripts check if different expressions are well-formed. The expressions are: Indicator (numerator and denominator), Program Indicator (expression and filter), Program Rule (condition -since 2.35-), Program Rule Actions (data expression -since 2.37-) and Predictors (generator data and sampleSkipTest).
This script checks if the data element associated to a program rule action belongs to the program that the program rule is associated to.
This script checks if the tracked entity attribute associated to a program rule action belongs to the program (or the tracked entity type) that the program rule is associated to.
This script checks if the data element associated to a program rule variable exists and belongs to the program that the program rule is associated to.
This script checks if the tracked entity attribute associated to a program rule variable exists and belongs to the program (or the tracked entity type) that the program rule is associated to.
This script checks if the resources follow the best practices of naming convention.
This script checks if the options present in the filter of eventCharts and eventReports are valid (comparing them with the current options of the optionSets related to the dataelements referenced in the filter).
This script checks if an option is NOT associated with an optionSet (i.e. search for orphan options).
This script checks if each optionSet has at least 2 options associated AND checks if the sortOrder of the options is valid (i.e. starts at 1 and the latest sortOrder value is the size of the list of options)
This script checks if the datatype of a DE associated to a optionSet is the same than the datatype of the optionSet. Also, it check that the codes of the options in the respective optionSet match the value type of the DE.
This script checks if an organization unit has coherent opening and closed dates (i.e. search for closedDate in the future or openingDate later than closedDate)
This script looks for optionSets that are not used in the system (neither in DE or TEA).
This script checks the use of "program_stage_name" (due to issues if the stage name is translated) in PR expression, PRA exression, PI expression, PI filter.
This script checks if a program indicator has a expression.
This script checks if the program rule variable that appears in '!#{prv}' has boolean/true_only type.
This script checks that in program rule actions (ASSIGN, DISPLAY TEXT, DISPLAY KEY/VALUE PAIR, SHOW WARNING, SHOW ERROR, WARNING ON COMPLETE, ERROR ON COMPLETE), if the expression to evaluate and assign/display is a text, it has to be in single quotes.
This script checks if a program rule has a condition.
This script checks if a program rule has at least one program rule action.
This script checks if a program rule variable has not "and", "or" or "not" in its name
This script checks if a program (event/tracker) has at least one programStage (i.e. search for programs without programStages).
This script checks if a programStage is NOT associated with a program (i.e. search for orphan programStage).
This script checks if a programStageSection is NOT associated with a programStage (i.e. search for orphan programStageSections).
This script checks if a program without registration (event program) is associated (unexpectedly) to a Tracked Entity Type.
This script checks the number of elements that are part of a group or a set, raising an error if the number is unexpected (like groups conformed by one element).
This script checks if more than one resource of a particular type has the same name (configurable as name, shortname, formname) for the same locale.
This script checks that all names and codes of the options that belongs to an optionSet are unique.
This script checks that an organisation unit can be member of exactly one of the groups in a group set.
Groups and Sets that they are expected to be conformed by more than one element:
- programIndicatorGroups: programIndicators
- dataElementGroups: dataElements
- programTrackedEntityAttributeGroups: programTrackedEntityAttributes
- indicatorGroups: indicators
- validationRuleGroups: validationRules
- predictorGroups: predictors
- categoryOptionGroups: categoryOptions
- organisationUnitGroups: organisationUnits
- userGroups: users
- optionGroups: options
- categories: categoryOptions
- indicatorGroupSets: indicatorGroups
- organisationUnitGroupSets: organisationUnitGroups
- optionSets: options
- legendSets: legends
- dataElementGroupSets: dataElementGroups
- categoryOptionGroupSets: categoryOptionGroups
- dataSets: dataSetElements
- colorSets: colors
- optionGroupSets: optionGroups
Resources that are expected to be linked with only one 'otherResource':
- dataElements: dataSetElements