Code uses emailDailyReportTo, documentation references emailDailyReportsTo
For the emailDailyReportTo setting, there is a mismatch between the EDStatic code reading setup.xml or environment variables (which references emailDailyReportTo) and the setup.xml documentation (which references emailDailyReportsTo).
EDStatic code reading emailDailyReportTo:
https://github.com/ERDDAP/erddap/blob/main/WEB-INF/classes/gov/noaa/pfel/erddap/util/EDStatic.java#L1843
Various documentation/comments referencing emailDailyReportsTo:
https://github.com/search?q=repo%3AERDDAP%2Ferddap%20emailDailyReportsTo&type=code https://github.com/ERDDAP/erddapContent/blob/main/content/erddap/setup.xml#L56 https://github.com/ERDDAP/erddapContent/blob/main/content/erddap/setup.xml#L69
These should be aligned, or EDStatic should be adjusted to accept both the singular and plural.
I think making EDStatic accept both would be the better solution.
To confirm if I understand this:
In setup.xml the tag is emailDailyReportsTo but EDStatic is trying to get emailDailyReportTo instead, which I assume is a typo?
If that is the case then in this code here
private static String getSetupEVString(
ResourceBundle2 setup, Map<String, String> ev, String paramName, String tDefault) {
String value = ev.get("ERDDAP_" + paramName);
if (String2.isSomething(value)) {
String2.log("got " + paramName + " from ERDDAP_" + paramName);
return value;
}
return setup.getString(paramName, tDefault);
}
setup.getString() would always return null since emailDailyReportTo does not exist in setup.xml file and only the ev.get() method is working.
Why don't we just update it to emailDailyReportsTo in this line
emailDailyReportToCsv =
getSetupEVString(setup, ev, "emailDailyReportTo", ""); // won't be null
is it important to support both emailDailyReportsTo and emailDailyReportTo?
It would be good to support both emailDailyReportsTo and emailDailyReportTo. Users have their own setup.xml and some likely followed the documentation and set emailDailyReportsTo while some may have figured out the proper name is emailDailyReportTo.
The reason to support both is to not break folks current set up. Especially because this is a circumstance it's very easy to support both (read emailDailyReportTo and if that is not set, then read emailDailyReportsTo).
There is also the line https://github.com/ERDDAP/erddap/blob/main/src/browser/gov/noaa/pfel/coastwatch/OneOf.java#L255 which I am not sure is something related or to be changed here
There is also the line https://github.com/ERDDAP/erddap/blob/main/src/browser/gov/noaa/pfel/coastwatch/OneOf.java#L255 which I am not sure is something related or to be changed here
That does not need to be changed. That was code to support an old feature that is not used.
I think this can be closed with the merge of https://github.com/ERDDAP/erddap/pull/236
Yes, this will be in the next release (2.26), which is targeted for late January.