CAA0558 / android-shuffle

Automatically exported from code.google.com/p/android-shuffle
0 stars 0 forks source link

Shuffle 2.0.1 Displays the Due Time of an Action Instead of the Due Date in Some Cases #295

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new action with a problematic due date (see below)
2. Go to a view where that action is shown

What is the expected output? What do you see instead?
The date should be shown. Instead, the time is displayed.

What version of the product are you using? On what operating system?
Shuffle 2.0.1 on CyanoGenMod Android 2.3.5 with kernel 2.6.32.44

Please provide any additional information below.
Unfortunately, I find it hard to reproduce the phenomenon. But it seems the 
rule which is used to either display the date, or the time, of an action is 
flawed. I swear it shows only the time when it should show the date. I believe 
it happened once when I just changed the month but not date and year, but 
yesterday I had a case where I could not think of any reasonable relation 
between effect and possible cause.

Original issue reported on code.google.com by el.goog....@gmail.com on 2 May 2012 at 7:42

GoogleCodeExporter commented 9 years ago
Can you look out for such cases and note the wrong displayed dates & times when 
you noticed that specific wrongly displayed actions? That way we can possibly 
locate the error faster.

Original comment by LippertsJan on 2 May 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Attached please find a screenshot of my Next Actions view as of May 2nd, 22:45 
GMT+2 (DST). As you can see, the third-but-last entry is shown with a due time 
of 07:00, between an entry due on May 28th and another one due on June 1st. 
Tapping on that entry, 07:00 is shown again. Tapping on edit, however, reveals 
that it is due on May 30, 07:00.

Hope this helps.

Original comment by el.goog....@gmail.com on 2 May 2012 at 8:58

Attachments:

GoogleCodeExporter commented 9 years ago
On closer examination, it appears that e.g. in the "due next month" view, all 
entries which are due on the same weekday as today, are shown with their time 
of day only -- regardless of whether they are due today, next week, in two 
weeks, or in three weeks.

Original comment by el.goog....@gmail.com on 16 May 2012 at 6:09

GoogleCodeExporter commented 9 years ago
I've looked into this a bit, that is, I have looked at the code. I may be wrong 
and have not validated any of this but here are some findings.

I would expect that the getShortDate() method works, despite it using 
deprecated Date() methods for comparison.

However, looking at TaskListView, it creates a dueDateColumn, in which it 
displays getShortDate(taskValue.getModifiedDate()).

Interestingly, taskValue is a TaskProxy object which has both getModifiedDate() 
and getDueDate() methods, so the question is, why would one want to display a 
modification date in a column called due date.

It may be a first hint at the source of the problem, or just a point where a 
few comments would be helpful regarding why display and database column names 
differ.

Original comment by el.goog....@gmail.com on 3 Jun 2012 at 8:10

GoogleCodeExporter commented 9 years ago
TaskListView is GWT code for the website so doesn't impact the Android app.
The code you want is in TaskListItem here...
http://code.google.com/p/android-shuffle/source/browse/shuffle-android/src/org/d
odgybits/shuffle/android/list/view/task/TaskListItem.java#283
It uses the inbuilt Android relative time span method which can indeed show 
just the time if the due date is for today. See 
http://developer.android.com/reference/android/text/format/DateUtils.html#getRel
ativeTimeSpanString(android.content.Context, long) 

Original comment by andybry...@gmail.com on 10 Jun 2012 at 6:11