I defined for a project the new code period as 2019-07-28. For every analysis that I performed today (2019-07-29), I get the error:
Invalid new code period. ‘2019-07-28’ is not one of: integer > 0, date before current analysis j, “previous_version”, or version string that exists in the project’
Please contact a project administrator to correct this setting
The project had code changes today so my expection was to have a normal analysis
When you set the new code period to a date, the next analysis will choose a ‘baseline’ against which to make all the “New Code Period” comparisons. The baseline is the first analysis on record inside the date range, so in your case after midnight on 2019-07-28.
Your only previous analysis took place before the New Code Period, so there’s no analysis available to be the baseline. That means the New Code Period comparisons can’t be made. Since we use a fail-fast approach, rather than giving you bad comparisons or not making the comparisons, we stop analysis instead. That’s why your analysis is erroring-out.
To fix this you probably need to do this:
set New Code Period to 2019-07-26
analyze. You now have an analysis dated 2019-07-30
set New Code Code Period to 2019-07-28. Your 2019-07-30 analysis will be your baseline from here out