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

Alert category #5854

Merged
merged 3 commits into from Jul 4, 2019
Merged

Alert category #5854

merged 3 commits into from Jul 4, 2019

Conversation

sqllensman
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes Export-DbaInstance - add user defined types #5376)
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Purpose

In order to fix one of issues of #5376, namely scripting out alert categories it is necessary to add the functions to Add, Remove or Retrieve Alert Categories in SQL Agent. (similar to Job Categories)

Also fixed minor formatting issues in the AgentJobCategory functions

Commands to test

Get-DbaAgentAlertCategory
New-DbaAgentAlertCategory
Remove-DbaAgentAlertCategory
New-DbaAgentJobCategory
Remove-DbaAgentAlertCategory

@potatoqualitee
Copy link
Member

ohhh shoooooo! thank you 🙇‍♀

[parameter(Mandatory, ValueFromPipeline)]
[DbaInstance[]]$SqlInstance,
[PSCredential]$SqlCredential,
[string[]]$Category,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[string[]]$Category,
[object[]]$Category,

@potatoqualitee we used to do these as object types for TEPP, are we still shooting for that?

Copy link
Member

Choose a reason for hiding this comment

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

it should be string, we generally moved away from object after we started doing InputObject, tho there are exceptions. we can shoot for tepp but it's not required. it's sort of a pain in the butt so i stopped 😅

@sqllensman
Copy link
Contributor Author

As all of these issues are inherited from the AgentJobSchedule functions I will update both these new functions and the AgentJobSchedule functions.

Also should I be adding piping support so that results of the Get functions can be piped to Remove functions?

@potatoqualitee
Copy link
Member

that would be great and appreciated. thank you, patrick!

@potatoqualitee potatoqualitee merged commit 633bb81 into dataplat:development Jul 4, 2019
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.

Export-DbaInstance - add user defined types
3 participants