Cli-microsoft365: Enhancement: Add `name` option to `todo list set` command

Created on 9 Sep 2020  路  6Comments  路  Source: pnp/cli-microsoft365

The m365 todo list set command currently only accepts the id of the list that you want to update, for example...

m365 todo list set --id "AAMkAGI3NDhlZmQzLWQxYjAtNGJjNy04NmYwLWQ0M2IzZTNlMDUwNAAuAAAAAACQ1l2jfH6VSZraktP8Z7auAQCbV93BagWITZhL3J6BMqhjAAD9pHIhAAA=" --newName "My updated task list"

It would be helpful if we could just pass in the name of the current list as an option so that the user doesn't have to manually find id of the list using other means, for example...

m365 todo list set --name "My List" --newName "My New List"

The proposed spec for this change is shown below

Option|Description
------|-----------
-i, --id [id]| The ID of the list to update. Specify either id or name, not both
-n, --name [name]| The display name of the list to update. Specify either id or name, not both
--newName <newName>| The new name for the task list

enhancement good first issue work in progress

Most helpful comment

@garrytrinder - Seems like an exciting one since I haven't tried my hands on todo APIs . Can you assign it to me..

All 6 comments

@garrytrinder - Seems like an exciting one since I haven't tried my hands on todo APIs . Can you assign it to me..

Absolutely, all yours 馃槉.

Thank you for your help @arjunumenon 馃憤

Hello @garrytrinder / @waldekmastykarz - As per This Conversation, one of the enhancement in the pipeline is to update assert.equal and assert.notEqual in all the test cases.

In this PR, do you want me to update the test cases for m365 todo list set with that as well when I modify as part of this PR?
Or would that be handled separately when you do the issue #1737 ?

Can you advise on that please.

Thanks for reaching out on this @arjunumenon good spot 馃憤馃徎

Please use the strict assertions on the tests for this command, let's not introduce code that uses deprecated methods.

To add to that, I'm working on some larger refactorings that should include these changes, so for now you can just include the changes in your own work. Appreciate your thoughts on this @arjunumenon 鉂わ笍

Thanks @garrytrinder / @waldekmastykarz for the recommendation.

Always pleasure to help in whatever ways I can to minimize your effort. 馃

Was this page helpful?
0 / 5 - 0 ratings