Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
-
Empty show more show less
-
Global Maintenance 4
-
2
Description
Hi,
when tasks are stored in JCR nodes, the node corresponding the number of month is wrong (or confusing). That is, for today 29th August 2017, the node structure will be 2017/7/29 instead of 2017/8/29 (see the attached screenshot). This seems to happen due to the behaviour of the method getCurrentDateFolderPath in info.magnolia.task.persistence.TaskPathGenerator which for month it starts by 0 for January.
info.magnolia.task.persistence.TaskPathGenerator.java
/**
* @return a path in the form <code>/tasks/current_year/current_month/current_day</code>
*/
protected String getCurrentDateFolderPath() {
Calendar cal = Calendar.getInstance();
String year = String.valueOf(cal.get(Calendar.YEAR));
String month = String.valueOf(cal.get(Calendar.MONTH));
String day = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
return "/" + TasksStore.ROOT_NODE + "/" + year + "/" + month + "/" + day;
}
Some clients find it confusing and asked for a solution as you could see in the related tickets.
Regards.
Checklists
Acceptance criteria
Attachments
Issue Links
- is related to
-
MGNLWORKFLOW-352 Tasks are stored in wrong folder structure - month
-
- Closed
-