{"action":"created","issue":{"url":"https://api.github.com/repos/opserver/Opserver/issues/224","repository_url":"https://api.github.com/repos/opserver/Opserver","labels_url":"https://api.github.com/repos/opserver/Opserver/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/opserver/Opserver/issues/224/comments","events_url":"https://api.github.com/repos/opserver/Opserver/issues/224/events","html_url":"https://github.com/opserver/Opserver/pull/224","id":186869909,"number":224,"title":"Added 'Unknown' to JobRunSources enum.","user":{"login":"johnboker","id":4153912,"avatar_url":"https://avatars.githubusercontent.com/u/4153912?v=3","gravatar_id":"","url":"https://api.github.com/users/johnboker","html_url":"https://github.com/johnboker","followers_url":"https://api.github.com/users/johnboker/followers","following_url":"https://api.github.com/users/johnboker/following{/other_user}","gists_url":"https://api.github.com/users/johnboker/gists{/gist_id}","starred_url":"https://api.github.com/users/johnboker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnboker/subscriptions","organizations_url":"https://api.github.com/users/johnboker/orgs","repos_url":"https://api.github.com/users/johnboker/repos","events_url":"https://api.github.com/users/johnboker/events{/privacy}","received_events_url":"https://api.github.com/users/johnboker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-02T17:37:10Z","updated_at":"2016-11-02T18:46:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opserver/Opserver/pulls/224","html_url":"https://github.com/opserver/Opserver/pull/224","diff_url":"https://github.com/opserver/Opserver/pull/224.diff","patch_url":"https://github.com/opserver/Opserver/pull/224.patch"},"body":"When trying to view the jobs I got the error below.  A little debugging showed `@j.LastRunRequestedSource` in /OpsServer/Views/SQL/Instance.Jobs.cshtml had a value of `0`, which is not really valid.  Adding JobRunSources.Unknown with a value of 0 causes the error to go away. Here's a pull request if this is the desired fix.  I'm not sure why it had a value of 0 so there might be an issue elsewhere.\r\n\r\n===================\r\n\r\nServer Error in '/' Application.\r\n\r\nSpecified argument was out of the range of valid values.\r\nParameter name: item\r\n\r\nDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. \r\n\r\nException Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\r\nParameter name: item\r\n\r\nSource Error: \r\n\r\n```\r\nLine 30:             @foreach (var j in data.OrderByDescending(j => j.LastRunRequestedDate))\r\nLine 31:             {\r\nLine 32:                 <tr class=\"@j.RowClass()@(j.IsRunning ? \" info\" : null)@(j.IsEnabled ? \"\" : \" text-muted\")\" data-guid=\"@j.JobId.ToString()\" title=\"@if(!j.IsEnabled){<text>(DISABLED) \r\nLine 33: </text>}Job: @j.Name\r\nLine 34: @j.Description\r\n```\r\nSource File: S:\\misc\\Opserver\\Opserver\\Views\\SQL\\Instance.Jobs.cshtml    Line: 32 \r\n\r\nStack Trace: \r\n\r\n```\r\n[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\r\nParameter name: item]\r\n   UnconstrainedMelody.Enums.GetDescription(T item) +133\r\n   ASP._Page_Views_SQL_Instance_Jobs_cshtml.Execute() in S:\\misc\\Opserver\\Opserver\\Views\\SQL\\Instance.Jobs.cshtml:32\r\n   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253\r\n   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148\r\n   System.Web.WebPages.StartPage.ExecutePageHierarchy() +89\r\n   System.Web.WebPages.StartPage.ExecutePageHierarchy() +89\r\n   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107\r\n   StackExchange.Profiling.Mvc.WrappedView.Render(ViewContext viewContext, TextWriter writer) +193\r\n   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81\r\n   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +186\r\n   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38\r\n   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29\r\n   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +67\r\n   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53\r\n   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36\r\n   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38\r\n   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44\r\n   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +67\r\n   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38\r\n   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399\r\n   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157\r\n```\r\n\r\nVersion Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1586.0"},"comment":{"url":"https://api.github.com/repos/opserver/Opserver/issues/comments/257961883","html_url":"https://github.com/opserver/Opserver/pull/224#issuecomment-257961883","issue_url":"https://api.github.com/repos/opserver/Opserver/issues/224","id":257961883,"user":{"login":"johnboker","id":4153912,"avatar_url":"https://avatars.githubusercontent.com/u/4153912?v=3","gravatar_id":"","url":"https://api.github.com/users/johnboker","html_url":"https://github.com/johnboker","followers_url":"https://api.github.com/users/johnboker/followers","following_url":"https://api.github.com/users/johnboker/following{/other_user}","gists_url":"https://api.github.com/users/johnboker/gists{/gist_id}","starred_url":"https://api.github.com/users/johnboker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnboker/subscriptions","organizations_url":"https://api.github.com/users/johnboker/orgs","repos_url":"https://api.github.com/users/johnboker/repos","events_url":"https://api.github.com/users/johnboker/events{/privacy}","received_events_url":"https://api.github.com/users/johnboker/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T18:46:03Z","updated_at":"2016-11-02T18:46:03Z","body":"Just tried with latest.  Much better.\r\n\r\nThanks for fixing this so quickly."}}
{"actor":{"display_login":"johnboker"}}