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 Management Unit to the project download standard columns. #631

Closed
chrisala opened this issue Jan 22, 2021 · 1 comment
Closed

Add Management Unit to the project download standard columns. #631

chrisala opened this issue Jan 22, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@chrisala
Copy link
Collaborator

In ProjectXlsExporter, t should be added to the commonProjectHeadersWithoutSites after the Service Provider column.
So that the ProjectXlsExporter doesn't introduce a GORM dependency and run the same query over and over again to lookup the management unit name, I suggest a similar approach to how the GmsMapper in MERIT works.

Pass a map of management unit id to name, with dynamic initialisation of the contents using Groovy's "withDefault":

Map managementUnits = [:].withDefault{name ->
Map mu = managementUnitService.getByName(name)
mu?.managementUnitId
}
def mapper = new GmsMapper(metadataService.activitiesModel(), metadataService.programsModel(), metadataService.organisationList()?.list, abnLookupService, metadataService.getOutputTargetScores(), programs, managementUnits)

@chrisala
Copy link
Collaborator Author

chrisala commented Feb 5, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant