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

[IO-1800] Set priority #697

Merged
merged 2 commits into from
Oct 24, 2023
Merged

[IO-1800] Set priority #697

merged 2 commits into from
Oct 24, 2023

Conversation

owencjones
Copy link
Contributor

Problem

No current access to setting priority of items

Solution

Implemented priority setter.

Changelog

Priority setting method in core
Tests

@linear
Copy link

linear bot commented Oct 23, 2023

IO-1800 Core: Edit items: Set priority

https://www.notion.so/v7labs/Item-Management-Functionality-Scoping-df5f846a135e46e1bf31c473afda32ee#c93dd9600c9b47b394df6660276d490d

set_item_priority(client, id, priority)
# client: Client
# id: str, validatable as UUID
# priority: Positive int

Copy link
Contributor

@Nathanjp91 Nathanjp91 left a comment

Choose a reason for hiding this comment

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

Nothing blocking

api_client: ClientCore,
team_slug: str,
priority: int,
filters: Optional[Dict[str, UnknownType]] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not blocking at all but interested here on your thoughts on
filters: Optional[...] = None vs filters: ... = {} Is it more pythonic to assume None's or empty objects? The former does tend to lead to requiring more typecheck guards to satisfy mypy/pylance with like assert filters is not None etc, which does feel more verbose than required sometimes.

Copy link
Contributor

Choose a reason for hiding this comment

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

but obviously, it is a bit more clear that filters isn't required via the Optional[...] = None approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah, good point, I like the default in this backend code, will take this suggestion

@owencjones owencjones merged commit 21cbfe0 into master Oct 24, 2023
owencjones added a commit that referenced this pull request Oct 24, 2023
owencjones added a commit that referenced this pull request Oct 24, 2023
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.

2 participants