Fixing: "Value 0 for dayOfMonth must be in the range" Error
If you upgrade from too old version of WorklogPRO to a recent version, you may have issues with DB values in holiday schema. You will see errors similar to the following:
172.30.203.123,172.30.130.245 /rest/com.deniz.jira.worklog/1.0/workHoursSchema/workHours [c.d.j.worklog.data.HolidaySchemaImp] Skipping invalid holiday definition: Value 0 for dayOfMonth must be in the range [1,31]
org.joda.time.IllegalFieldValueException: Value 0 for dayOfMonth must be in the range [1,31]
at org.joda.time.field.FieldUtils.verifyValueBounds(FieldUtils.java:277)
at org.joda.time.chrono.BasicChronology.getDateMidnightMillis(BasicChronology.java:632)
at org.joda.time.chrono.BasicChronology.getDateTimeMillis0(BasicChronology.java:186)
at org.joda.time.chrono.BasicChronology.getDateTimeMillis(BasicChronology.java:182) This is easy to fix if you have access to DB. If you don't have DB access, you need to delete the holiday schemas and recreate them. To fix it from the DB.
Open jiradb.public.AO_7B9828_HSDAY table
There are both "DAY" and "THE_DAY" columns. Copy all the values in "DAY" columns to "THE_DAY" column.
There are both "YEAR" and "THE_YEAR" column. Copy all the values in "YEAR" columns to the corresponding "THE_YEAR" column.
There are both "MONTH" and "THE_MONTH" columns. Copy all the values in "MONTH" column to the corresponding "THE_MONTH" column.
Commit all the changes.
Disable and re-enable the WorklogPRO.
In the following screenshot, the green rows are correct, but the red rows are invalid. If you are having this error, you should have lots of rows similar to red rows. You have to fix all of them.