The solution for
NMS-6075 was to modify some methods to pass the foreignSource and the foreignId (with the nodeId) of each node in order to determinate the proper RRD path no matter if storeByForeignSource is enabled or not.
The problem is that all customers with custom reports should update their templates in order to upgrade to the newest OpenNMS.
For this reason, it is important to re-create the old methods for backward compatibility. Of course, the old method implementations are going to throw an exception if a report template tries to use these old methods with storeByForeignSource enabled.