Hi All,
Kindly help with the below issue .
In production, we see a weird issue of the Same dates (11 Feb 21) displayed as different Workweek for the different custom fields. (Pic Attached)
Created is shown as 11/Feb/21 (WW7.4)
Schedule Start Date as 11/Feb/21 (WW6.Thur)
1.Created is System dates and Schedule Start Date is custom field using Date picker and using JAVA APIs.
2.Further, dates and times are stored internally in JIRA's database and depend on the timezone of the database. Our DB is configured as 1st Jan 2021 as WW1 and Sunday as the first day of the week. (Not as per ISO standard).
We want to have consistency in the dates and follow how created, updated, and resolved dates are displayed for all the Date custom field.
Solution tried in script console.
1. Fetching the schedule start date after the issue is created
2. Manipulating it as per NOT ISO standard. (code snippet added below). Output is correct in the script console.
3. Setting it back with the new date. No change in the WorkWeek.
Can you suggest how can we overcome this issue?
Code Snippet
CustomField actualStartDateCF = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Actual start date");
//get Calendar Instance
Calendar gc = Calendar.getInstance();
//SET as per Production DB
gc.setMinimalDaysInFirstWeek(1);
gc.setFirstDayOfWeek(Calendar.SUNDAY);
gc.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
gc.setTime(dueDate);
//Get the new date
Date newDueDate = gc.getTime();
log.error("new due date = " +newDueDate)
log.error("Due date WW = " + gc.get(Calendar.WEEK_OF_YEAR));
//WorkWEEK shown is correct
def dueTimestamp = new Timestamp(gc.getTimeInMillis())
issue.setDueDate(dueTimestamp);
//After setting NO change in workweek in JIRA view
Thanks
Amita
Hello together,
we have the same issue described below and urgently need a solution.
Best regards
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.