Closed Bug 321535 Opened 19 years ago Closed 15 years ago

Day/week view: Creating new event/task from context menu doesn't use selected/clicked time from view

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: gekacheka, Assigned: bv1578)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051225 Mozilla Sunbird/0.3a1+

right click context menu doesn't use clicked datetime (new event, new task)

Reproducible: Always

Steps to Reproduce:
1. In any grid view, say month view, 
   right click on a date, that is not selected date nor today.
2. click new event or new task
3.

Actual Results:  
Event/task dialog defaults date other than clicked date.

Expected Results:  
Event/task dialog defaults to clicked date.
(in day/week view, should default to clicked time).
Blocks: 321164
Keywords: regression
Attached patch select day for all clicks — — Splinter Review
This takes care of the easy part, making sure we get the correct day.  We're all probably going to need to sit down and chat about the time part, since the view currently doesn't have any way of displaying a specific time as selected.  Given the ability to drag out a specific time region, I'm not sure there's a huge use case for selecting a specific time in day/week views for new event/task creation.
Attachment #206853 - Flags: first-review?(mvl)
Comment on attachment 206853 [details] [diff] [review]
select day for all clicks

r=mvl
Attachment #206853 - Flags: first-review?(mvl) → first-review+
'select day for all clicks' patch checked in.  Updating summary to reflect what remains to be done on this bug.
Summary: right click context menu doesn't use clicked datetime (new event, new task) → right click context menu doesn't use clicked time (new event, new task) in day/week view
*** Bug 316744 has been marked as a duplicate of this bug. ***
This is a minor but significant annoyance. 

When using the Thunderbird "Day View" and double-clicking on a time slot to create a new event, the evant dialogue pane is opened and populated with the correct day (i.e. the one that was clicked on) but NOT the correct time, instead it pre-populates the event time to be the same current time, not the time slot that was clicked on. I have missed several appointments because of this already!!!
*** Bug 332870 has been marked as a duplicate of this bug. ***
Reassigning all automatically assigned bugs from Mostafa to nobody@m.o

Bugspam filter: TorontoMostafaMove
Assignee: mostafah → nobody
Component: Sunbird Only → Calendar Views
Target Milestone: --- → Sunbird 0.3
Not going to make the 0.3 train.
Target Milestone: Sunbird 0.3 → Sunbird 0.4
QA Contact: sunbird → views
Summary: right click context menu doesn't use clicked time (new event, new task) in day/week view → Day/week view: Creating new event/task doesn't use selected/clicked time from view
Taking over this issue
Assignee: nobody → Berend.Cornelius
Not going to make the 0.5 train.
Target Milestone: Sunbird 0.5 → ---
WFM using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9pre) Gecko/20071028 Calendar/0.8pre
WFM per comment#12 and myself.
Assignee: Berend.Cornelius → nobody
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Creating the event from the context menu doesn't use the clicked time.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: Day/week view: Creating new event/task doesn't use selected/clicked time from view → Day/week view: Creating new event/task from context menu doesn't use selected/clicked time from view
Status: REOPENED → NEW
Was this bug once fixed??? In the 0.9 nightly 0505200818 this problem was not an issue. But in the latest 0.9 nightly (2005200820) this is not workling! Either context menu or double-clicking any day does NOT select the clicked day, but the TODAY date.

As this seemed to be fixed before, it would be nice to have that working again!
(In reply to comment #16)
Fabi, this regression is already reported with Bug 432998.
Blocks: 440676
Philipp, could you give me a first opinion about this patch?

The code gets the clicked time in day/week view by using the handler |event="click" button="2"|.
Since the commands behavior for menu and toolbar buttons should be different from context menu one (always default date-time for the first and clicked date-time or default date-time, for the second), I've separated them by adding two new commands:

calendar_new_event_context_command
calendar_new_todo_context_command

These new commands pick up the clicked date-time or the default date-time (next hour) according to the zone where the right-click occurred:
- days columns   -> clicked date-time 
- column headers -> all-day date (tasks with default date-time);
- elsewhere      -> default date-time

It seems working fine in every cases, but I'd appreciate if someone could test a bit this patch, especially for particular cases which I could have missed, also because previous versions I did, broke others feature in event-task creation (mainly for tasks because I changed the initial date in the dialog to allow a datetime different from 'defaultStartDate' one).
Assignee: nobody → bv1578
Attachment #407312 - Flags: review?(philipp)
Status: NEW → ASSIGNED
Attachment #407312 - Attachment description: clicked time for new events/tasks in day/week view → [long,test] clicked time for new events/tasks in day/week view
Comment on attachment 407312 [details] [diff] [review]
[long,test] clicked time for new events/tasks in day/week view

This patch works fine, I couldn't discover any edge case that doesn't work.


r=philipp
Attachment #407312 - Flags: review?(philipp) → review+
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/8feb8fc0b485>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b2
does not work with day and week view on
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11pre) Gecko/20100514 Calendar/1.0b2pre

steps:
1. switch to week view
2. move mouse over the view so it selects hour which is 5 hours before current time
3. from context menu select "new event"
-> new created event has time = next full hour after current time

was it correct scenario?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #22)
> steps:
> 1. switch to week view
> 2. move mouse over the view so it selects hour which is 5 hours before current
> time
> 3. from context menu select "new event"
> -> new created event has time = next full hour after current time
> 
> was it correct scenario?

Let's say it works as requested in comment #0 but for the week and day views (apart from any possible bugs), i.e. you have to *right-click* in the point where you want the date-time for the new event/task:

1. right-click in any zone -> context menu appears 
2. select New Event/Task entry (from the context menu) -> the dialog gets 
   populated with the date-time where you clicked.

Does it work for you in this way?

It doesn't work if you click (left-click), then press e.g. the New Event button on the toolbar or the main menu, because, I think, it would need the ability to highlight the time slot where you clicked that should be Bug 368722.
I'm sorry, I missed _right_

move back to fixed
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11pre) Gecko/20100514
Calendar/1.0b2pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: