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

[15.0][MIG] project_timeline: Migration to 15.0 #942

Merged
merged 22 commits into from
Sep 9, 2022

Conversation

cesar-tecnativa
Copy link

@Tecnativa TT37717

@leemannd
Copy link

leemannd commented Jul 6, 2022

/ocabot migration project_timeline

@cesar-tecnativa
Copy link
Author

Deppends on OCA/web#2247

<div class="o_project_timeline_item">
<img
t-if="record.user_ids"
t-attf-src="/web/image/res.users/#{record.user_ids[0][0]}/image_128/16x16"

Choose a reason for hiding this comment

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

I had to change to user_ids[0] to give ID or no image displayed:

t-attf-src="/web/image/res.users/#{record.user_ids[0]}/image_128/16x16"

Copy link
Member

Choose a reason for hiding this comment

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

You can display all user_ids images with this:

<t t-foreach="record.user_ids" t-as="user_id"> <img t-attf-src="/web/image/res.users/#{user_id}/image_128/16x16" width="16" height="16" class="mr8" alt="User" /> </t>

<img
t-if="record.user_ids"
t-attf-src="/web/image/res.users/#{record.user_ids[0][0]}/image_128/16x16"
t-att-title="record.user_ids[0][1]"
Copy link

@chrisandrewmann chrisandrewmann Jul 28, 2022

Choose a reason for hiding this comment

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

Removed t-att-title as not working (user_ids is only a list of IDs apparently)

@chrisandrewmann
Copy link

Also noticed after doing some testing that timeline crashes when grouping by a many2many field (Assignees) for example, with error below.

UncaughtClientError > TypeError
Uncaught Javascript Error > Cannot read properties of undefined (reading 'localeCompare')
TypeError: Cannot read properties of undefined (reading 'localeCompare')
at group_order (http://localhost:8069/web/assets/681-7ac6ca2/web.assets_backend.min.js:10370:21)
at Array.sort ()
at DataSet._sort (http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:14783:24)
at DataSet.getIds (http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:14642:17)
at ItemSet._orderGroups (http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:32446:41)
at ItemSet.redraw (http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:31842:23)
at http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:24820:30
at Array.forEach ()
at Timeline._redraw (http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:24819:48)
at Timeline._redraw (http://localhost:8069/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js:37574:31)

@CarlosRoca13 CarlosRoca13 force-pushed the 15.0-mig-project_timeline branch 2 times, most recently from 535046c to b304f9c Compare August 2, 2022 12:53
default_group_by="project_id"
event_open_popup="true"
colors="white: user_ids == []; #2ecb71: kanban_state == 'done'; #ec7063: kanban_state == 'blocked'"
>
Copy link

@chrisandrewmann chrisandrewmann Aug 2, 2022

Choose a reason for hiding this comment

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

Seeing as V15 now has task dependency built-in, could I suggest we add the following to put the arrows on tasks that use this feature:

                colors="white: user_ids == []; #2ecb71: kanban_state == 'done'; #ec7063: kanban_state == 'blocked'"
                dependency_arrow="depend_on_ids"
            >

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding what you say, the timeline will look like this:
imagen

I think the timeline is a bit overloaded

Choose a reason for hiding this comment

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

Yeah appreciate that, but thought we could deprecate project_task_dependency and project_timeline_task_dependency in favour of they now achieve the same in 15.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I didn't know about the extra modules to add this. Added the feature 😄

@pedrobaeza
Copy link
Member

Please rebase and push for forcing the rebuild.

pedrobaeza and others added 19 commits August 4, 2022 08:54
==========================
Timeline view for projects
==========================

This module extends the standard tasks actions to add the timeline view to
them, and also adds the needed fields in the view for handling them.

Usage
=====

* Go to *Project > Project > Tasks*.
* Click on the icon with a clock.
* You will see the tasks in the new view.
* [IMP] Add start and end date in task form view

* [IMP] Add start and end date in task form view
* Timeline for project.project (OCA#398)

  Creates a timeline for projects. Useful for huge campaigns with multiple projects.

* Unsetting date_end (OCA#402)

* Tests

* Task timeline template (OCA#410)
Currently, if `date_end` is not set it will result in a KeyError.
…_state : blocked tasks are red and task without user are white

[IMP] project_timeline : planned_hours is displayed only if not null
Modules that bring `gantt` and `map` view mode are not declared in module dependency
Those modes were introduced by https://github.com/OCA/project/pull/869/files#r785447743
@CarlosRoca13
Copy link
Contributor

Done @pedrobaeza

@pedrobaeza
Copy link
Member

I'm having the same problem as stated in v14 about disappearing elements when moving them to unassigned, plus if I do double click in an item for editing it:

Peek 04-08-2022 09-43

@jguenat
Copy link
Member

jguenat commented Aug 4, 2022

I don't have this traceback locally, seems like an issue with runboat. I tried to reset the runboat build.

@jguenat
Copy link
Member

jguenat commented Sep 9, 2022

Hello @chrisandrewmann
Do you also have the issues mentionned by @pedrobaeza ?
On my side it works as expected.

@chrisandrewmann
Copy link

@jguenat I don't see them myself either, I tested on a local instance and have also deployed to my production system.

@pedrobaeza
Copy link
Member

Sorry, the concerns were already fixed:

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-942-by-pedrobaeza-bump-nobump, awaiting test results.

@pedrobaeza
Copy link
Member

/ocabot migration project_timeline

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Sep 9, 2022
@OCA-git-bot OCA-git-bot mentioned this pull request Sep 9, 2022
32 tasks
@OCA-git-bot OCA-git-bot merged commit fa77c2e into OCA:15.0 Sep 9, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b3767fe. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.