[TIME-302] Monhtly view shows empty weeks

Issue #302 resolved
Andriy Zhdanov created an issue

After upgrade to 2.3.7 montly view shows some weeks empty. Attachment timesheet in 2.3.6.png shows a time time sheet in 2.3.6 with correct information where as attachment timesheet in 2.3.8 shows weeks 43, 44, 45 as empty.

Is there a logic change (such that week 42 column shows now something else than it showed in earlier versions) or is this a defect?

By tuukka.ilomaki/Tuukka Ilomäki on Fri, 16 Nov 2012 05:20:12 -0800

Comments (28)

  1. Andriy Zhdanov reporter

    Thank you for the quick fix. It fixes the issue, indeed.

    By tuukka.ilomaki on Mon, 19 Nov 2012 22:49:26 -0800

  2. Andriy Zhdanov reporter

    Great, thank you for confirmation. Have great experience with it further on!

    By azhdanov on Tue, 20 Nov 2012 00:42:51 -0800

  3. Andriy Zhdanov reporter

    I had to resurrect this issue, since even if weeks are not empty anymore, different amount of hours is reported when the view is scrolled. I will attach a screen shot.

    By tuukka.ilomaki on Fri, 7 Dec 2012 03:47:19 -0800

  4. Andriy Zhdanov reporter

    Should be fixed now, please reinstall 2.3.8 again, and sorry for troubles.
    Available now, build j32.

    By azhdanov on Fri, 7 Dec 2012 14:37:48 -0800

  5. Andriy Zhdanov reporter

    Build j32 shows weeks correctly but the first week is always empty (week 45 in the attached image).

    By tuukka.ilomaki on Sun, 9 Dec 2012 22:47:22 -0800

  6. Andriy Zhdanov reporter

    Hi Tuukka,

    Please try to reinstall again, I have not managed to reproduce it, but found something suspicious.

    Thank you.

    By azhdanov on Tue, 11 Dec 2012 13:16:05 -0800

  7. Andriy Zhdanov reporter

    Hello Andrew, I installed build j33 but the first week is still empty.

    By tuukka.ilomaki on Tue, 11 Dec 2012 22:10:14 -0800

  8. Andriy Zhdanov reporter

    Hi Tuukka,

    I really can't figure out anything. Let's try to diagnose remotely:

    1) Are you sure there are log records for week#45? E.g. if you slide forward, is week#46 displayed empty then?

    2) If you click Details link, what are the startDate and endDate in that case? Does it correspond to week number? You can easily match dates to week number using JIRA calendar, in due date of an issue for example.

    3) Does everybody have the same problem? Rather, is there anybody who does not have this problem?

    4) What timezone are you in? And what is JIRA timezone? You can figure out this in your profile, and in general configuration.

    Thank you.

    By azhdanov on Thu, 13 Dec 2012 12:16:10 -0800

  9. Andriy Zhdanov reporter

    Hi Andrew,
    1) Yes, there are log records for each week. If I slide forward or backward, the first week is always displayed empty.

    2) When I click details it shows period as Start Date : 11.11.2012, End Date : 16.12.2012. As 11.11.2012 is Sunday and at least in Finnish calendar it belongs to week 45, but as it is Sunday we have no one reporting hours and the sum is zero.

    3) Yes, everybody.

    4) We – both users and server – are in Helsinki timezone (GMT+02:00)

    Item 2 could well be the culprit. I cannot say if it boils down to us having misconfigured the system

    By tuukka.ilomaki on Thu, 13 Dec 2012 12:43:50 -0800

  10. Andriy Zhdanov reporter

    Ok, I have some idea, just to double check, what day do you use for Reporting Day option of the gadget?

    By azhdanov on Thu, 13 Dec 2012 13:52:27 -0800

  11. Andriy Zhdanov reporter

    I use Monday as Reporting Day. However, changing it to Sunday, Wednesday, Today or any other day did not help.

    By tuukka.ilomaki on Thu, 13 Dec 2012 21:59:21 -0800

  12. Andriy Zhdanov reporter

    Hi Tuukka,

    Unfortunately, I still have not managed to reproduce a problem, even though I have some glue. It appears startDate is wrong in your case, in the case it should be 18/Nov, and gadget should show just four weeks, for a month view. But what's more important, it's apparently is calculated correctly internally when retrieving worklogs from JIRA, but is wrong when displaying the timesheet, so first week is empty.

    So, I've just made another long shot, please try re-install plugin, but now from this location: https://studio.plugins.atlassian.com/builds/artifact/TIME-TRUNK/JOB1/build-5/JAR/target/jira-timesheet-plugin-2.3.8.jar Because it's not possible to update plugin jar at marketplace any more. Good thing is that if anything will go wrong it's easy to rollback - reinstall version from marketplace. Note, I will release new generally available version when I solve this problem so you won't have custom plugin version.

    Thank you for your patience and great help with this problem!

    By azhdanov on Fri, 14 Dec 2012 04:38:46 -0800

  13. Andriy Zhdanov reporter

    Hello Andrew, I installed version b5 but it still shows the same behaviour.

    Using Monday as reporting day, the weekly view shows correctly dates Mon 10/12 through Sun 16/12. When I switch to montly view it shows time period 18.11.2012 - 23.12.2012, that is, starting from Sunday.

    The same happens both in our production JIRA running v5.1.6#785 and our test JIRA running v5.2#812. I tried changing JIRA time zone and the time zone of my machine but with no lock (though did not reboot JIRA as it takes quite a long time).

    If you wish to write some debug data to logs, I will be happy to collect those for you.

    By tuukka.ilomaki on Fri, 14 Dec 2012 05:46:50 -0800

  14. Andriy Zhdanov reporter

    Hi Tuukka,

    Well, I've slightly changed way of calculating startDate for month view, could you please give it one more try: https://studio.plugins.atlassian.com/builds/artifact/TIME-TRUNK/JOB1/build-6/JAR/target/jira-timesheet-plugin-2.3.8.jar

    Regarding Sunday, this is intentionally, but you're right, it could be good idea to use reporting day for week boundary. I.e. now Sunday is used for week boundary, but reporting day could make more sense. Hopefully I will take care of it next time.

    Thank you.

    By azhdanov on Fri, 14 Dec 2012 14:57:08 -0800

  15. Andriy Zhdanov reporter

    Hello Andrew,
    I installed b6. The monthly view now shows four weeks (47 through 50) but the first week is empty. The tooltip on week 47 shows 25/11 - 1/12. The details view shows five weeks (47 through 51) and time span Start Date : 25.11.2012, End Date : 23.12.2012.

    If reporting day is Monday, gadget shows weeks 47 through 50 and if reporting day is Sunday, gadget shows weeks 46 through 49 (I do not know if it matters that today is Sunday).

    By tuukka.ilomaki on Sun, 16 Dec 2012 12:24:37 -0800

  16. Andriy Zhdanov reporter

    Hi Tuukka,

    Thank you for detailed answer, it's a pity I still can't get any idea why problem happens. So, I've made another long shot attempt to fix, please try: https://studio.plugins.atlassian.com/builds/artifact/TIME-TRUNK/JOB1/build-9/JAR/target/jira-timesheet-plugin-2.3.8.jar

    Note, what's strange is that for week#47 it is 25/11 - 1/12, for me these dates are for week#48.

    Note, I have also changed endDate to be always after today, and fixed it for report.

    After all let's try to debug. Could you enable logging for Timesheet and see what's there?

    You need to enable DEBUG level in jira/WEB-INF/classes/log4j.properties as follows:

    log4j.logger.jira.plugin.report.timesheet = DEBUG, console, filelog
    log4j.additivity.jira.plugin.report.timesheet = false

    And restart JIRA.

    Then, when accessing dashboard, you should see the following in console (catalina.out) or atlassian-jira.log:

    Searching worklogs created since ...
    Query returned : — NOT RELEVANT
    Issue ... did not match ... — NOT RELEVANT
    Worklog with date ... did not match ...

    Note, if you have multiple gadgets on dashboard, it will have more messages in the series.
    Please send me these messages.

    Note, ignore "WARN velocity Warning" messages.

    Thank you for your cooperation!!!

    By azhdanov on Mon, 17 Dec 2012 04:29:27 -0800

  17. Andriy Zhdanov reporter

    Hello Andrew, I installed build b9 and attached the logs. In case they are of help, I attached logs for the week, month and details view.

    These come from a dashboard with a single gadget. I have an odd feeling that at some point I had an older dashboard with two gadgets with similar configuration but showing different weeks. When I edited the older one, it started showing faulty weeks as well. This might suggest that something funny happens when saving the configuration. Just an idea.

    By tuukka.ilomaki on Tue, 18 Dec 2012 05:11:43 -0800

  18. Andriy Zhdanov reporter

    Got it!!! Sunday is last day in a week in Finland, so weeks are shifted right and actually current week worklogs are thrown away. My logic is not valid for most of other Locales than US, working on fix. Thank you!

    By azhdanov on Tue, 18 Dec 2012 14:22:01 -0800

  19. Andriy Zhdanov reporter

    Hello Andrew,
    good news and bad news. First, the good news is that I are now seeing the weeks I wish to see. The culprit was surely what you described. But, the bad news is that I am now missing the details in the tooltips: the tootips are completely empty. I was hoping to verify the hours by counting up hours in the tooltips but they are not showing. (Update: tooltips show details in week view but not in month view.)

    I am a stubborn tester

    By tuukka.ilomaki on Tue, 18 Dec 2012 22:30:47 -0800

  20. Andriy Zhdanov reporter

    Hi Tuukka,

    Good news is great, and glad you check it carefully! However, I can't get how tooltips could disappear, did month view tooltips ever work for you? Are there any errors in jira log?

    Thank you.

    By azhdanov on Wed, 19 Dec 2012 02:08:50 -0800

  21. Andriy Zhdanov reporter

    Hello Andrew,
    month view tooltips have worked for me. I am nor sure when they stopped working, but at least in this image the month view shows tooltips. In the test environment I have build b5 and it shows tooltips as usual.

    Could it be that after the logic change regarding calculating the week, tooltips is still showing worklogs using the old logic and therefore from wrong time pediod?

    Update: No errors in the logs.

    By tuukka.ilomaki on Wed, 19 Dec 2012 02:35:50 -0800

  22. Andriy Zhdanov reporter

    Hi Andrew,
    correct hours and tooltips visible again. I am happy now.

    By tuukka.ilomaki on Wed, 19 Dec 2012 05:47:22 -0800

  23. Andriy Zhdanov reporter

    Hi Tuukka,

    Great, I'm happy too Feel free to use GA 2.3.9 and thank you for your help in making plugin better. I wish you Merry Christmas and Happy New Year!

    By azhdanov on Wed, 19 Dec 2012 14:45:25 -0800

  24. Andriy Zhdanov reporter

    Hello Andrew,
    I happily upgraded to 2.3.9.

    Merry Christmas and Happy New Year to you as well!

    By tuukka.ilomaki on Thu, 20 Dec 2012 00:24:06 -0800

  25. Log in to comment