When there is no yearly backup retention policy, Get-AzSqlDatabaseLongTermRetentionPolicy returns 0 for WeekOfYear, but Azure Portal displays 'Week 1' as default and Set-AzSqlDatabaseLongTermRetentionPolicy wants a number between 1 and 52. #27045
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
needs-triage
This is a new issue that needs to be triaged to the appropriate team.
Description
When there is no yearly backup retention policy, Get-AzSqlDatabaseLongTermRetentionPolicy returns 0 for WeekOfYear.
The value "0" does not make sense, as week 0 does not exist in a solar year.
Furthermore, Azure Portal displays "Week 1" as default and Set-AzSqlDatabaseLongTermRetentionPolicy wants a number between 1 and 52. This means Get-AzSqlDatabaseLongTermRetentionPolicy returns a wrong output, or at least an output that is in contradiction with Azure Portal and Set-AzSqlDatabaseLongTermRetentionPolicy.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: