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

Add To-do due date and description fields #104128

Merged
merged 20 commits into from Nov 28, 2023

Conversation

allenporter
Copy link
Contributor

@allenporter allenporter commented Nov 17, 2023

Proposed change

Add To-do due date/time and description fields, with a separate feature entity for each SET_DUE_DATE_ON_ITEM, SET_DUE_DATETIME_ON_ITEM, and SET_DESCRIPTION_ON_ITEM.

These fields will be supported by the following integrations:

Example local to-do output:

    - summary: Maintenance item
      uid: f006f6cc-85de-11ee-8c5f-0242ac110002
      status: needs_action
      description: Some description
    - summary: Maintenance item (due date)
      uid: f7c895c8-85de-11ee-8c5f-0242ac110002
      status: needs_action
      due: "2023-11-17"
    - summary: Maintenance item (due date time)
      uid: 25f1dacc-85df-11ee-8f0d-0242ac110002
      status: needs_action
      due: "2023-11-18T06:00:00-08:00"

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (todo) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of todo can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign todo Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@allenporter
Copy link
Contributor Author

From discussion, we do want datetime in the UI. Will mark as draft and have a separate feature flag for date vs datetime.

@allenporter allenporter marked this pull request as draft November 18, 2023 04:19
@allenporter allenporter marked this pull request as ready for review November 18, 2023 07:29
@allenporter allenporter added the noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Nov 18, 2023
homeassistant/components/todo/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/todo/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/todo/__init__.py Show resolved Hide resolved
homeassistant/components/todo/const.py Outdated Show resolved Hide resolved
homeassistant/components/todo/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/todo/const.py Outdated Show resolved Hide resolved
homeassistant/components/todo/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/todo/services.yaml Outdated Show resolved Hide resolved
homeassistant/components/todo/services.yaml Outdated Show resolved Hide resolved
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft November 21, 2023 13:30
Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

There is a merge conflict.

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare
Copy link
Member

Should this wait for a frontend PR?

@allenporter
Copy link
Contributor Author

Should this wait for a frontend PR?

I was assuming that it should in case we need any changes, though it does work fine as standalone service calls without UI right now.

@MartinHjelmare
Copy link
Member

We've decided to merge this before the frontend work is done. We'll work on the UI design and frontend separately in the next release cycle.

Please solve the merge conflict and then go ahead and merge. Thanks!

@MartinHjelmare MartinHjelmare self-assigned this Nov 28, 2023
@MartinHjelmare
Copy link
Member

I've rebased and fixed some issues after the rebase. When CI passes we can merge.

@MartinHjelmare MartinHjelmare merged commit b8cc334 into home-assistant:dev Nov 28, 2023
53 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed has-tests integration: todo new-feature noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) Quality Scale: internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants