cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Ensure all `spo` command have `--listId`, `--listTitle` and `--listUrl` options

Open milanholemans opened this issue 1 year ago • 5 comments

Noticed some sort of inconsistency for the spo commands. To reference a list, you could use 3 ways: title, id or URL.

Below is a summary of all commands with their missing option(s).

Command Options to add
spo contenttype add --listId, --listUrl
spo contenttype get --listId, --listUrl
spo contenttype field remove --listId, --listUrl
spo field add --listId, --listUrl
spo field set --listUrl
spo list get --url
spo list roleinheritance break --listUrl
spo list roleinheritance reset --listUrl
spo list contenttype add --listUrl
spo list contenttype list --listUrl
spo list contenttype remove --listUrl
spo list contenttype default set --listUrl
spo list label get --listUrl
spo list sitescript get --listUrl
spo list view list --listUrl
spo list view remove --listUrl
spo list view set --listUrl
spo list view field add --listUrl
spo list view field remove --listUrl
spo list view field set --listUrl
spo list webhook add --listUrl
spo list webhook get --listUrl
spo list webhook list --listUrl
spo list webhook remove --listUrl
spo list webhook remove --listUrl
spo list webhook remove --listUrl
spo listitem add --listUrl
spo listitem attachment list --listUrl
spo listitem get --listUrl
spo listitem isrecord --listUrl
spo listitem list --listUrl
spo listitem remove --listUrl
spo listitem roleinheritance break --listUrl
spo listitem roleinheritance reset --listUrl
spo listitem set --listUrl
spo listitem record declare --listUrl
spo listitem record undeclare --listUrl

Not sure if we should do this all in one go or consider this as an epic issue.

milanholemans avatar Sep 17 '22 18:09 milanholemans

Nice work @milanholemans! It's a lot of issues if we create them all separately, and the work is rather repetitive. I personally think it would benefit us if we just took it in one go. What about you?

martinlingstuyl avatar Sep 17 '22 20:09 martinlingstuyl

title already exists, should we change this to --newTtitle?

About this one: that would be a breaking change. I think we should make a separate issue for renaming it, so we can take it up for v6

martinlingstuyl avatar Sep 17 '22 20:09 martinlingstuyl

Nice work @milanholemans! It's a lot of issues if we create them all separately, and the work is rather repetitive. I personally think it would benefit us if we just took it in one go. What about you?

That was exactly what I was thinking. What about your issue? Should we close it then?

However for spo list set where --title is already an existing property, maybe we should remove it from this issue and create a separate issue for the v6 branch?

milanholemans avatar Sep 17 '22 20:09 milanholemans

title already exists, should we change this to --newTtitle?

About this one: that would be a breaking change. I think we should make a separate issue for renaming it, so we can take it up for v6

Great minds think alike 😄

milanholemans avatar Sep 17 '22 20:09 milanholemans

Issue already exists #3627

Yeah, I noticed it too :)

Let's close that one as a duplicate if we agree on doing this in one issue

martinlingstuyl avatar Sep 17 '22 20:09 martinlingstuyl

Even though the work is repetitive, it's a lot of work because it includes adding options, updating command logic for retrieving list, updating docs, adding examples, adding tests, so I'd be all for breaking it up and changing this to an epic.

waldekmastykarz avatar Oct 09 '22 08:10 waldekmastykarz

Even though the work is repetitive, it's a lot of work because it includes adding options, updating command logic for retrieving list, updating docs, adding examples, adding tests, so I'd be all for breaking it up and changing this to an epic.

Would you create 1 issue each command? Will be quite some issues.

milanholemans avatar Oct 09 '22 09:10 milanholemans

What if we'd group similar commands and create an issue for each group?

waldekmastykarz avatar Oct 09 '22 10:10 waldekmastykarz

All done, great job everyone!

milanholemans avatar Nov 19 '22 11:11 milanholemans