{"action":"created","issue":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/204","repository_url":"https://api.github.com/repos/sqlcollaborative/dbatools","labels_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/204/comments","events_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/204/events","html_url":"https://github.com/sqlcollaborative/dbatools/issues/204","id":177512075,"number":204,"title":"Copy-SqlAgentJob dealing with jobs where owner does not exist on destination","user":{"login":"wsmelton","id":11204251,"avatar_url":"https://avatars.githubusercontent.com/u/11204251?v=3","gravatar_id":"","url":"https://api.github.com/users/wsmelton","html_url":"https://github.com/wsmelton","followers_url":"https://api.github.com/users/wsmelton/followers","following_url":"https://api.github.com/users/wsmelton/following{/other_user}","gists_url":"https://api.github.com/users/wsmelton/gists{/gist_id}","starred_url":"https://api.github.com/users/wsmelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsmelton/subscriptions","organizations_url":"https://api.github.com/users/wsmelton/orgs","repos_url":"https://api.github.com/users/wsmelton/repos","events_url":"https://api.github.com/users/wsmelton/events{/privacy}","received_events_url":"https://api.github.com/users/wsmelton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/labels/migrations","name":"migrations","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"wsmelton","id":11204251,"avatar_url":"https://avatars.githubusercontent.com/u/11204251?v=3","gravatar_id":"","url":"https://api.github.com/users/wsmelton","html_url":"https://github.com/wsmelton","followers_url":"https://api.github.com/users/wsmelton/followers","following_url":"https://api.github.com/users/wsmelton/following{/other_user}","gists_url":"https://api.github.com/users/wsmelton/gists{/gist_id}","starred_url":"https://api.github.com/users/wsmelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsmelton/subscriptions","organizations_url":"https://api.github.com/users/wsmelton/orgs","repos_url":"https://api.github.com/users/wsmelton/repos","events_url":"https://api.github.com/users/wsmelton/events{/privacy}","received_events_url":"https://api.github.com/users/wsmelton/received_events","type":"User","site_admin":false},"assignees":[{"login":"wsmelton","id":11204251,"avatar_url":"https://avatars.githubusercontent.com/u/11204251?v=3","gravatar_id":"","url":"https://api.github.com/users/wsmelton","html_url":"https://github.com/wsmelton","followers_url":"https://api.github.com/users/wsmelton/followers","following_url":"https://api.github.com/users/wsmelton/following{/other_user}","gists_url":"https://api.github.com/users/wsmelton/gists{/gist_id}","starred_url":"https://api.github.com/users/wsmelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsmelton/subscriptions","organizations_url":"https://api.github.com/users/wsmelton/orgs","repos_url":"https://api.github.com/users/wsmelton/repos","events_url":"https://api.github.com/users/wsmelton/events{/privacy}","received_events_url":"https://api.github.com/users/wsmelton/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/milestones/3","html_url":"https://github.com/sqlcollaborative/dbatools/milestones/November%202016%20Release","labels_url":"https://api.github.com/repos/sqlcollaborative/dbatools/milestones/3/labels","id":2012315,"number":3,"title":"November 2016 Release","description":"Focus will primarily be on bug fixes.","creator":{"login":"dansqldba","id":20303014,"avatar_url":"https://avatars.githubusercontent.com/u/20303014?v=3","gravatar_id":"","url":"https://api.github.com/users/dansqldba","html_url":"https://github.com/dansqldba","followers_url":"https://api.github.com/users/dansqldba/followers","following_url":"https://api.github.com/users/dansqldba/following{/other_user}","gists_url":"https://api.github.com/users/dansqldba/gists{/gist_id}","starred_url":"https://api.github.com/users/dansqldba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dansqldba/subscriptions","organizations_url":"https://api.github.com/users/dansqldba/orgs","repos_url":"https://api.github.com/users/dansqldba/repos","events_url":"https://api.github.com/users/dansqldba/events{/privacy}","received_events_url":"https://api.github.com/users/dansqldba/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":0,"state":"open","created_at":"2016-09-18T22:48:39Z","updated_at":"2016-10-01T23:01:45Z","due_on":"2016-11-15T00:00:00Z","closed_at":null},"comments":0,"created_at":"2016-09-16T20:21:05Z","updated_at":"2016-10-10T02:34:43Z","closed_at":null,"body":"When copying jobs maybe add a switch (or include it in force) that if the owner of a job does not exist the job will simply be assigned to the \"sa\" account.\r\n\r\nJob ownership is one of those things in best practice that jobs shouldn't be owned by users as those accounts are most commonly dropped if the person leaves and such. Situations where SSRS are involved is a special case that those jobs should be owned by the SSRS service account. [Although moving of SSRS jobs should probably be skipped. SSRS migration is a process all byitself.] "},"comment":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/comments/252529776","html_url":"https://github.com/sqlcollaborative/dbatools/issues/204#issuecomment-252529776","issue_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/204","id":252529776,"user":{"login":"wsmelton","id":11204251,"avatar_url":"https://avatars.githubusercontent.com/u/11204251?v=3","gravatar_id":"","url":"https://api.github.com/users/wsmelton","html_url":"https://github.com/wsmelton","followers_url":"https://api.github.com/users/wsmelton/followers","following_url":"https://api.github.com/users/wsmelton/following{/other_user}","gists_url":"https://api.github.com/users/wsmelton/gists{/gist_id}","starred_url":"https://api.github.com/users/wsmelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsmelton/subscriptions","organizations_url":"https://api.github.com/users/wsmelton/orgs","repos_url":"https://api.github.com/users/wsmelton/repos","events_url":"https://api.github.com/users/wsmelton/events{/privacy}","received_events_url":"https://api.github.com/users/wsmelton/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T02:34:43Z","updated_at":"2016-10-10T02:34:43Z","body":"The catch found on this (believe it was discussed in slack channel when I found it)....the owner of a job is a straight string for string match to `$server.Logins`. \r\n\r\nWhich this is not sufficient in cases where an owner is a valid login, because it is part of a Windows Group. The login would have to be done in 2 stages:\r\n\r\n1. Does login exist on the instance\r\n2. Does login have access through a Windows Group login (discussion in Slack noted use of `IsWindowsGroupMember` method, you pass in the group name). "}}
{"actor":{"display_login":"wsmelton"}}