Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] web_timeline: Handle inverted date ranges #2774

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

houzefa-abba
Copy link
Member

Inverted dates make no functional sense, but when they do happen, this change allows displaying them as single points in the timeline (same as when begin=end).

We currently do have such demo data when installing project_timeline:
Screenshot at 2024-03-21 12-24-31

Before: office design tasks are missing

Screenshot at 2024-03-21 11-53-24

After: office design tasks are shown

Screenshot at 2024-03-21 11-50-51

@OCA-git-bot
Copy link
Contributor

Hi @tarteo,
some modules you are maintaining are being modified, check this out!

@pedrobaeza pedrobaeza added this to the 16.0 milestone Mar 21, 2024
@pedrobaeza
Copy link
Member

I don't get the concept of "inverted date".

@houzefa-abba
Copy link
Member Author

I don't get the concept of "inverted date".

Sorry I wasn't clear enough; this is when end date is before start date (in my example, March 21st ➔ March 19th).

Makes no sense, but at least with this change they won't be completely hidden.

@houzefa-abba houzefa-abba changed the title [16.0][IMP] web_timeline: Handle inverted date ranges WIP: [16.0][IMP] web_timeline: Handle inverted date ranges Mar 21, 2024
@houzefa-abba houzefa-abba marked this pull request as draft March 21, 2024 12:42
@houzefa-abba houzefa-abba changed the title WIP: [16.0][IMP] web_timeline: Handle inverted date ranges [16.0][IMP] web_timeline: Handle inverted date ranges Mar 21, 2024
@houzefa-abba houzefa-abba marked this pull request as ready for review March 21, 2024 12:46
@pedrobaeza
Copy link
Member

I think that should be forbidden by a constraint (SQL or Python).

@houzefa-abba houzefa-abba force-pushed the 16.0-timeline-inverted-dates branch 2 times, most recently from 3999bd5 to 22856c0 Compare April 2, 2024 14:22
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the constraint in project_timeline should be added IMO.

@houzefa-abba
Copy link
Member Author

But the constraint in project_timeline should be added IMO.

Yes constraint and demo data, because demo data produces these "reversed dates"

I'll look into it soon

@houzefa-abba
Copy link
Member Author

But the constraint in project_timeline should be added IMO.

Yes constraint and demo data, because demo data produces these "reversed dates"

I'll look into it soon

Done with OCA/project#1259 & OCA/project#1260

Inverted dates make no functional sense, but when they do happen, this
change allows displaying them as single points in the timeline (same as
when begin=end).

We currently do have such demo data when installing project_timeline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants