Bug 1480029

Summary: [ECompEditor] Preserve original duration when changing time
Product: [Fedora] Fedora Reporter: Luigi Cantoni <luigic>
Component: evolutionAssignee: Milan Crha <mcrha>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 26CC: lucilanga, mcrha
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: evolution-3.25.92 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-22 11:34:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luigi Cantoni 2017-08-10 00:18:16 UTC
Description of problem:
I create appointments with no duration (as place holders).
When I go into the event to make a change it will then set the end time to 1 hour later rather then the same as the start time. This happens even if the start time is unchanged like changing the date only.

Version-Release number of selected component (if applicable):
evolution.x86_64                     3.24.4-1.fc26 

How reproducible:
yes

Steps to Reproduce:
1. create an appoint and have the start and end time the same and save it.
2. go in to alter it and change the date to the say the next day
3. the end time becomes 1 hour after the start time

Actual results:
end time changes with being requested to change

Expected results:
End time should remain the same difference to the start time even if that is 0

Additional info:
This has been around for a long time and finally I have decided to report it.
It is just annoying.

If you are looking at that code area then the time pull down should start around the time you already have. It is a pain when the time currently recorded in the field is 15:00 and when you want you change it it shows you the am times starting at midnight when really you are most likely to want to change the time to something around the time you already have. This is just it would be nice item.

Comment 1 Milan Crha 2017-08-22 09:52:20 UTC
(In reply to Luigi Cantoni from comment #0)
> Actual results:
> end time changes with being requested to change

Thanks for a bug report. I see it depends what start time is selected. When it's before the end time, then the end time doesn't change at all. When it's after end time, then the end time is adjusted to be one hour after the start time, just as you said. There had been a request to not try to be too "smart", thus the change to the time before the end time is expected behaviour. The change of the start time to the later time than the end time is questionable.

> If you are looking at that code area then the time pull down should start
> around the time you already have. It is a pain when the time currently
> recorded in the field is 15:00 and when you want you change it it shows you
> the am times starting at midnight when really you are most likely to want to
> change the time to something around the time you already have.

Right, the behaviour of the "what is scrolled to" depends on gtk+ itself, it's a standard GtkComboBox. Some time values are not always selected, which may add to the issue. I made a change to make the popup non-scrollable when possible, it shows the times in columns, which is easier to pick the time from. I changed it for evolution 3.25.92+ with commit:
https://git.gnome.org/browse/evolution/commit/?id=91384ad

Comment 2 Milan Crha 2017-08-22 11:34:26 UTC
The commit message contains a bit of information behind the change, it's for 3.25.92+:
https://git.gnome.org/browse/evolution/commit/?id=407d4e1