Skip to content

Feature add dynamic filter for task activities per project#469

Merged
kbeker merged 2 commits intomasterfrom
feature-add-dynamic-filter-for-task-activities-per-project
Aug 7, 2019
Merged

Feature add dynamic filter for task activities per project#469
kbeker merged 2 commits intomasterfrom
feature-add-dynamic-filter-for-task-activities-per-project

Conversation

@Szymiks
Copy link
Contributor

@Szymiks Szymiks commented Aug 1, 2019

Related: #460

On this branch I added dynamic filter for task activity list per each project.
After approving this PR: #460 I will start to create a panel admin view for task activities.

After full_check you can notice two failed test but It has been reported because it occured on master branch.

@Szymiks Szymiks added feature New feature priority low Tasks with low priority labels Aug 1, 2019
@Szymiks Szymiks self-assigned this Aug 1, 2019
@Szymiks Szymiks force-pushed the feature-add-dynamic-filter-for-task-activities-per-project branch from b5903a4 to c067352 Compare August 1, 2019 08:36
Copy link
Contributor

@rwrzesien rwrzesien left a comment

Choose a reason for hiding this comment

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

Nice one, please just add validation for url GET data .

Copy link
Contributor

@dybi dybi left a comment

Choose a reason for hiding this comment

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

Looks good, just one thing to potentially improve.

self.fields["task_activities"].queryset = TaskActivityType.objects.filter(projects=project_id).order_by(
"name"
)
except (ValueError, TypeError):
Copy link
Contributor

Choose a reason for hiding this comment

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

When can TypeError occur? If my understanding is correct, ValueError can happen when i.e. string is passed as project.

Besides, for suppressing exceptions I would recommend using: with suppress(MyException) - it's a bit shorter and better reveals intention in my opinion: https://docs.python.org/3/library/contextlib.html#contextlib.suppress

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dybi, when someone will pass to self.data something lik {"project": "abcd" + 2}

@Szymiks Szymiks force-pushed the feature-project-should-have-custamisavle-task-activity-list branch from 73824e2 to f9d4457 Compare August 5, 2019 10:26
@kbeker kbeker added this to the v1.0.0 milestone Aug 6, 2019
@Szymiks Szymiks force-pushed the feature-project-should-have-custamisavle-task-activity-list branch from f9d4457 to 7bd31fb Compare August 6, 2019 11:41
@Szymiks Szymiks force-pushed the feature-add-dynamic-filter-for-task-activities-per-project branch from 566aeb5 to ed82965 Compare August 7, 2019 08:50
Copy link
Contributor

@kbeker kbeker left a comment

Choose a reason for hiding this comment

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

You did a great job here. Approve :)

@kbeker kbeker force-pushed the feature-add-dynamic-filter-for-task-activities-per-project branch from ed82965 to fefe685 Compare August 7, 2019 17:14
@kbeker kbeker changed the base branch from feature-project-should-have-custamisavle-task-activity-list to master August 7, 2019 17:16
@kbeker kbeker force-pushed the feature-add-dynamic-filter-for-task-activities-per-project branch from fefe685 to cfac76f Compare August 7, 2019 17:16
@kbeker kbeker merged commit cfac76f into master Aug 7, 2019
@kbeker kbeker deleted the feature-add-dynamic-filter-for-task-activities-per-project branch August 7, 2019 17:48
@kbeker kbeker modified the milestones: v1.0.0, v0.9.0 Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature priority low Tasks with low priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants