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

Add Custom Location Mapping feature: it allows to run automated reports for multiples Location/OrgUni mapping. #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ahammi
Copy link

@ahammi ahammi commented Jan 9, 2019

Add Custom Location Mapping feature: it allows to run automated reports for multiples Location/OrgUni mapping.

Copy link
Contributor

@kaweesi kaweesi left a comment

Choose a reason for hiding this comment

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

am not sure i know well enough what this is meant to add! can you brief me more detailed wise what you want to achieve before i can proceed reviewing.

try {
if (!mappingsDirecory.mkdirs()) {
log.warn("Not able to create resource folder");
}else{
Copy link
Contributor

Choose a reason for hiding this comment

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

some right code format needed here too, '}else'

Copy link
Author

Choose a reason for hiding this comment

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

fixed - please see my last commit

}else{
File directory = new File(getClass().getClassLoader().getResource("mappings").getFile());
FileUtils.copyDirectory(directory, mappingsDirecory);
log.debug("Copiyed all the mapping files to:"+mappingsDirecory);
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

Copy link
Author

Choose a reason for hiding this comment

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

fixed - please see my last commit

@@ -64,6 +67,8 @@
public static final String GLOBAL_PROPERTY_USER = "dhisconnector.user";

public static final String GLOBAL_PROPERTY_PASS = "dhisconnector.pass";

public static final String GLOBAL_PROPERTY_FULL_MAPPING = "dhisconnector.fullmappingvalues";
Copy link
Contributor

Choose a reason for hiding this comment

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

why not initialise this in config.xml, better you even have it in one place and reference it from there where else you need it

Copy link
Author

Choose a reason for hiding this comment

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

I wanted to be coherent with the other codes (user and password preoperties)

Copy link
Contributor

Choose a reason for hiding this comment

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

those (user & pass) are initialised in config.xml

@ahammi
Copy link
Author

ahammi commented Jan 18, 2019

I added new menu called Custom Location Mapping. It allows to predefine a list of mapping between locations and OrgUnits :
image

That custom mapping can be used within Automation menu, so the reports is runned for all predefined mappings at once:
image

I hope I was clear. Thanks for your time

@kaweesi
Copy link
Contributor

kaweesi commented Jan 18, 2019 via email

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.

2 participants