Invalid new code period using a date

I tried to set a specific date for new code period using a web api. But the result I get is following.

Invalid new code period. '2020-09-08' is not one of: integer > 0, date before current analysis j, "previous_version", or version string that exists in the long-lived branch. 
Please contact a project administrator to correct this setting

The document I followed is this.

And I tried setting many different dates, even to year 2020. But none of them worked.

'key': 'sonar.leak.period', 'value': '2020-09-08'
'key': 'sonar.leak.period.type', 'value': '2020-09-08'

Please help to resolve this issue. Let me know if there is other information you need.
Thanks in advance.

Oh I figured it out. I should have give a string date as a value for sonar.leak.period.type.
The documentation should be fixed. <date> got me wasting hours. :frowning:

1 Like

Welcome to Sonar Community and thanks for your contribution!

We are sorry for the inconvenience caused by this documentation error and will correct it.

1 Like

I checked to see if the document is updated. It’s still the same.

Fixed now. Sorry about the delay.