{"action":"reopened","issue":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/3878","repository_url":"https://api.github.com/repos/sqlcollaborative/dbatools","labels_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/3878/labels{/name}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/3878/comments","events_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/3878/events","html_url":"https://github.com/sqlcollaborative/dbatools/issues/3878","id":347347798,"node_id":"MDU6SXNzdWUzNDczNDc3OTg=","number":3878,"title":"Copy-DbaAgentJob maintenance plan check has error","user":{"login":"mdumdei","id":6575855,"node_id":"MDQ6VXNlcjY1NzU4NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/6575855?v=4","gravatar_id":"","url":"https://api.github.com/users/mdumdei","html_url":"https://github.com/mdumdei","followers_url":"https://api.github.com/users/mdumdei/followers","following_url":"https://api.github.com/users/mdumdei/following{/other_user}","gists_url":"https://api.github.com/users/mdumdei/gists{/gist_id}","starred_url":"https://api.github.com/users/mdumdei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdumdei/subscriptions","organizations_url":"https://api.github.com/users/mdumdei/orgs","repos_url":"https://api.github.com/users/mdumdei/repos","events_url":"https://api.github.com/users/mdumdei/events{/privacy}","received_events_url":"https://api.github.com/users/mdumdei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-03T10:40:51Z","updated_at":"2018-08-03T10:47:38Z","closed_at":null,"author_association":"NONE","body":"Line 142 in the GitHub source for Copy-DbaAgentJob has an error - at least on my system:\r\n\r\n  $MaintenancePlanName = $sourceServer.Query($sql).MaintenancePlanName\r\n\r\nThis fixes it:\r\n $MaintenancePlanName = $sourceServer.Databases.Item(\"msdb\").Query($sql).MaintenancePlanName\r\n\r\nQuery doesn't like running against the server, wants a database. \r\n"}}
{"actor":{"display_login":"mdumdei"}}