AnsweredAssumed Answered

How to modify reportmodulesdefs without overwriting an existing reportmodulesdefs file?

Question asked by Chad Hutchins on Jul 13, 2018

We use the reportmodulesdef.php file to prevent some of our custom modules from being reportable. To do this we place a file named

reportmodulesdefs.php

in the folder

custom/modules/Reports/metadata/

Inside of that file you do something like this to prevent modules from being reportable:

<?php

$exemptModules[] = 'ModuleNameOne';
$exemptModules[] = 'ModuleNameTwo';
$exemptModules[] = 'ModuleNameThree';

After a repair and rebuild, those modules would no longer be reportable in Reports.

 

The problem with this is there is no way for someone else to install a different module that hides more modules from reports. When they install their own reportmodulesdefs.php file it will overwrite the one that was already there. There is no way to merge the $exemptModules array without manually editing the files, which means it's not possible in the Sugar Cloud environment. There's also not an Extension to manage this.

 

Is there any other way where two packages could be installed via the module loader could add to the custom/modules/Reports/metadata/reportsmodulesdefs.php file and they not overwrite each other?

 

Are there plans to add an Extension endpoint to manage this?

 

Thanks!

Outcomes