Skip to content

Adds 'tenant serviceannouncement healthissue get' command. Closes #2951#2973

Merged
plamber merged 3 commits intopnp:mainfrom
SmitaNachan:tenant-serviceannouncement-healthissue-get
Feb 5, 2022
Merged

Adds 'tenant serviceannouncement healthissue get' command. Closes #2951#2973
plamber merged 3 commits intopnp:mainfrom
SmitaNachan:tenant-serviceannouncement-healthissue-get

Conversation

@SmitaNachan
Copy link
Copy Markdown
Contributor

Adds tenant serviceannouncement healthissue get command. Closes #2951

@waldekmastykarz
Copy link
Copy Markdown
Member

Awesome @SmitaNachan, we'll review it shortly 👏

@plamber plamber self-assigned this Jan 25, 2022
@plamber
Copy link
Copy Markdown
Contributor

plamber commented Jan 25, 2022

Hi @SmitaNachan,
I am going to review it shortly. I will provide you with some feedback.

We will merge the PR once #2948 is implemented.

Cheers

@plamber
Copy link
Copy Markdown
Contributor

plamber commented Feb 1, 2022

Hi @SmitaNachan,
thank you for your contribution.

I just reviewed the command and I would like to ask you to do some more validations from your end. Could you please verify the output when using it in conjunction with the output text and CSV and remove the output that is not readable?

Let me know if you have further questions.

Cheers,
Patrick

@SmitaNachan
Copy link
Copy Markdown
Contributor Author

Hi @plamber

Adjusted the output for text and csv. Please review.

image

@plamber
Copy link
Copy Markdown
Contributor

plamber commented Feb 2, 2022

Thank you @SmitaNachan , will come back to you asap

@plamber plamber merged commit c8170ef into pnp:main Feb 5, 2022
Copy link
Copy Markdown
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

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

I've done a couple of more adjustments to align the changes with existing commands


## Options

`-i, --issueId <issueId>`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Following the naming convention, we shouldn't repeat issue and just use id


## Examples

Get specified service health issue for tenant with issueId _MO226784_
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's simplify this to Gets information about issue with ID _MO226784_

m365 tenant serviceannouncement healthissue get --issueId MO226784
```

## More information
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can skip this as referencing the underlying API has no added value to CLI's users

issueId: string;
}

class TenantServiceAnnouncementHealthissueGetCommand extends GraphCommand {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For readability, let's spell the command's name as HealthIssue

return 'Gets a specified service health issue for tenant';
}

public defaultProperties(): string[] | undefined {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

defaultProperties are meant to be used only on list commands where we return multiple items. Since we return a single item here, we shouldn't define them so that we return all properties.


public getTelemetryProperties(args: CommandArgs): any {
const telemetryProps: any = super.getTelemetryProperties(args);
telemetryProps.issueId = typeof args.options.issueId !== 'undefined';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Because issueId is required, there's no point in tracking its usage because it would always be true

@SmitaNachan SmitaNachan deleted the tenant-serviceannouncement-healthissue-get branch May 12, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New command: m365 tenant serviceannouncement healthissue get

3 participants