{"action":"created","comment":{"url":"https://api.github.com/repos/Alfresco/Aikau/pulls/comments/72999739","id":72999739,"diff_hunk":"@@ -344,7 +344,10 @@ define([\"dojo/_base/declare\",\n          filesAdded = parseInt(filesAdded, 10);\n          totalFiles = parseInt(totalFiles, 10);\n \n-         if (!total || !done || !filesAdded || !totalFiles)\n+         // 0 is a legal numeric value (e.g. initial \"start\" progress)\n+         // can't use simple truthy vs non-truthy check\n+         if (isNaN(total) || total < 0 || isNaN(done) || done < 0 ||\n+                 isNaN(filesAdded) || filesAddded < 0 || isNaN(totalFiles) || totalFiles < 0)","path":"aikau/src/main/resources/alfresco/renderers/Progress.js","position":8,"original_position":8,"commit_id":"d6cf57abdd5b7931373daec37a4f8d39e1a0d01a","original_commit_id":"d6cf57abdd5b7931373daec37a4f8d39e1a0d01a","user":{"login":"draperd","id":1084047,"avatar_url":"https://avatars.githubusercontent.com/u/1084047?v=3","gravatar_id":"","url":"https://api.github.com/users/draperd","html_url":"https://github.com/draperd","followers_url":"https://api.github.com/users/draperd/followers","following_url":"https://api.github.com/users/draperd/following{/other_user}","gists_url":"https://api.github.com/users/draperd/gists{/gist_id}","starred_url":"https://api.github.com/users/draperd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draperd/subscriptions","organizations_url":"https://api.github.com/users/draperd/orgs","repos_url":"https://api.github.com/users/draperd/repos","events_url":"https://api.github.com/users/draperd/events{/privacy}","received_events_url":"https://api.github.com/users/draperd/received_events","type":"User","site_admin":false},"body":"I think the issue here is a simple typo... `filesAddded` needs to be `filesAdded`.","created_at":"2016-08-01T15:37:04Z","updated_at":"2016-08-01T15:37:04Z","html_url":"https://github.com/Alfresco/Aikau/pull/1173#discussion_r72999739","pull_request_url":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173","_links":{"self":{"href":"https://api.github.com/repos/Alfresco/Aikau/pulls/comments/72999739"},"html":{"href":"https://github.com/Alfresco/Aikau/pull/1173#discussion_r72999739"},"pull_request":{"href":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173"}}},"pull_request":{"url":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173","id":79490372,"html_url":"https://github.com/Alfresco/Aikau/pull/1173","diff_url":"https://github.com/Alfresco/Aikau/pull/1173.diff","patch_url":"https://github.com/Alfresco/Aikau/pull/1173.patch","issue_url":"https://api.github.com/repos/Alfresco/Aikau/issues/1173","number":1173,"state":"open","locked":false,"title":"Allow valid 0-value in renderUI of Progress widget ","user":{"login":"AFaust","id":2211521,"avatar_url":"https://avatars.githubusercontent.com/u/2211521?v=3","gravatar_id":"","url":"https://api.github.com/users/AFaust","html_url":"https://github.com/AFaust","followers_url":"https://api.github.com/users/AFaust/followers","following_url":"https://api.github.com/users/AFaust/following{/other_user}","gists_url":"https://api.github.com/users/AFaust/gists{/gist_id}","starred_url":"https://api.github.com/users/AFaust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AFaust/subscriptions","organizations_url":"https://api.github.com/users/AFaust/orgs","repos_url":"https://api.github.com/users/AFaust/repos","events_url":"https://api.github.com/users/AFaust/events{/privacy}","received_events_url":"https://api.github.com/users/AFaust/received_events","type":"User","site_admin":false},"body":"Currently the Progress widget is only displaying/tracking any progress if at least one \"item\" (may not be used for file-based actions) has been \"done\". The simple truthy-check within a condition of renderUI eliminates 0 as a valid value despite it being perfectly valid for an initial progress update at the start of a long running operation.\r\n\r\nThis PR allows 0-values in renderUI by adapting the check to consider all non-negative integers as valid and explicitly checking for NaN.","created_at":"2016-07-31T17:15:46Z","updated_at":"2016-08-01T15:37:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe203d87b5b5df2e07c82d2dba88bb45ee7577b7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173/commits","review_comments_url":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173/comments","review_comment_url":"https://api.github.com/repos/Alfresco/Aikau/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alfresco/Aikau/issues/1173/comments","statuses_url":"https://api.github.com/repos/Alfresco/Aikau/statuses/d6cf57abdd5b7931373daec37a4f8d39e1a0d01a","head":{"label":"AFaust:Progress-nonTruthyValidProgress","ref":"Progress-nonTruthyValidProgress","sha":"d6cf57abdd5b7931373daec37a4f8d39e1a0d01a","user":{"login":"AFaust","id":2211521,"avatar_url":"https://avatars.githubusercontent.com/u/2211521?v=3","gravatar_id":"","url":"https://api.github.com/users/AFaust","html_url":"https://github.com/AFaust","followers_url":"https://api.github.com/users/AFaust/followers","following_url":"https://api.github.com/users/AFaust/following{/other_user}","gists_url":"https://api.github.com/users/AFaust/gists{/gist_id}","starred_url":"https://api.github.com/users/AFaust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AFaust/subscriptions","organizations_url":"https://api.github.com/users/AFaust/orgs","repos_url":"https://api.github.com/users/AFaust/repos","events_url":"https://api.github.com/users/AFaust/events{/privacy}","received_events_url":"https://api.github.com/users/AFaust/received_events","type":"User","site_admin":false},"repo":{"id":38165460,"name":"Aikau","full_name":"AFaust/Aikau","owner":{"login":"AFaust","id":2211521,"avatar_url":"https://avatars.githubusercontent.com/u/2211521?v=3","gravatar_id":"","url":"https://api.github.com/users/AFaust","html_url":"https://github.com/AFaust","followers_url":"https://api.github.com/users/AFaust/followers","following_url":"https://api.github.com/users/AFaust/following{/other_user}","gists_url":"https://api.github.com/users/AFaust/gists{/gist_id}","starred_url":"https://api.github.com/users/AFaust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AFaust/subscriptions","organizations_url":"https://api.github.com/users/AFaust/orgs","repos_url":"https://api.github.com/users/AFaust/repos","events_url":"https://api.github.com/users/AFaust/events{/privacy}","received_events_url":"https://api.github.com/users/AFaust/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AFaust/Aikau","description":"Aikau UI framework","fork":true,"url":"https://api.github.com/repos/AFaust/Aikau","forks_url":"https://api.github.com/repos/AFaust/Aikau/forks","keys_url":"https://api.github.com/repos/AFaust/Aikau/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AFaust/Aikau/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AFaust/Aikau/teams","hooks_url":"https://api.github.com/repos/AFaust/Aikau/hooks","issue_events_url":"https://api.github.com/repos/AFaust/Aikau/issues/events{/number}","events_url":"https://api.github.com/repos/AFaust/Aikau/events","assignees_url":"https://api.github.com/repos/AFaust/Aikau/assignees{/user}","branches_url":"https://api.github.com/repos/AFaust/Aikau/branches{/branch}","tags_url":"https://api.github.com/repos/AFaust/Aikau/tags","blobs_url":"https://api.github.com/repos/AFaust/Aikau/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AFaust/Aikau/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AFaust/Aikau/git/refs{/sha}","trees_url":"https://api.github.com/repos/AFaust/Aikau/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AFaust/Aikau/statuses/{sha}","languages_url":"https://api.github.com/repos/AFaust/Aikau/languages","stargazers_url":"https://api.github.com/repos/AFaust/Aikau/stargazers","contributors_url":"https://api.github.com/repos/AFaust/Aikau/contributors","subscribers_url":"https://api.github.com/repos/AFaust/Aikau/subscribers","subscription_url":"https://api.github.com/repos/AFaust/Aikau/subscription","commits_url":"https://api.github.com/repos/AFaust/Aikau/commits{/sha}","git_commits_url":"https://api.github.com/repos/AFaust/Aikau/git/commits{/sha}","comments_url":"https://api.github.com/repos/AFaust/Aikau/comments{/number}","issue_comment_url":"https://api.github.com/repos/AFaust/Aikau/issues/comments{/number}","contents_url":"https://api.github.com/repos/AFaust/Aikau/contents/{+path}","compare_url":"https://api.github.com/repos/AFaust/Aikau/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AFaust/Aikau/merges","archive_url":"https://api.github.com/repos/AFaust/Aikau/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AFaust/Aikau/downloads","issues_url":"https://api.github.com/repos/AFaust/Aikau/issues{/number}","pulls_url":"https://api.github.com/repos/AFaust/Aikau/pulls{/number}","milestones_url":"https://api.github.com/repos/AFaust/Aikau/milestones{/number}","notifications_url":"https://api.github.com/repos/AFaust/Aikau/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AFaust/Aikau/labels{/name}","releases_url":"https://api.github.com/repos/AFaust/Aikau/releases{/id}","deployments_url":"https://api.github.com/repos/AFaust/Aikau/deployments","created_at":"2015-06-27T15:45:20Z","updated_at":"2016-03-25T00:33:34Z","pushed_at":"2016-08-01T15:20:14Z","git_url":"git://github.com/AFaust/Aikau.git","ssh_url":"git@github.com:AFaust/Aikau.git","clone_url":"https://github.com/AFaust/Aikau.git","svn_url":"https://github.com/AFaust/Aikau","homepage":null,"size":74551,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Alfresco:develop","ref":"develop","sha":"b3dba10d1fb375bf2570fdc26a1a6b6a2fc09f26","user":{"login":"Alfresco","id":391127,"avatar_url":"https://avatars.githubusercontent.com/u/391127?v=3","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"repo":{"id":29740360,"name":"Aikau","full_name":"Alfresco/Aikau","owner":{"login":"Alfresco","id":391127,"avatar_url":"https://avatars.githubusercontent.com/u/391127?v=3","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alfresco/Aikau","description":"Aikau UI framework","fork":false,"url":"https://api.github.com/repos/Alfresco/Aikau","forks_url":"https://api.github.com/repos/Alfresco/Aikau/forks","keys_url":"https://api.github.com/repos/Alfresco/Aikau/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alfresco/Aikau/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alfresco/Aikau/teams","hooks_url":"https://api.github.com/repos/Alfresco/Aikau/hooks","issue_events_url":"https://api.github.com/repos/Alfresco/Aikau/issues/events{/number}","events_url":"https://api.github.com/repos/Alfresco/Aikau/events","assignees_url":"https://api.github.com/repos/Alfresco/Aikau/assignees{/user}","branches_url":"https://api.github.com/repos/Alfresco/Aikau/branches{/branch}","tags_url":"https://api.github.com/repos/Alfresco/Aikau/tags","blobs_url":"https://api.github.com/repos/Alfresco/Aikau/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alfresco/Aikau/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alfresco/Aikau/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alfresco/Aikau/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alfresco/Aikau/statuses/{sha}","languages_url":"https://api.github.com/repos/Alfresco/Aikau/languages","stargazers_url":"https://api.github.com/repos/Alfresco/Aikau/stargazers","contributors_url":"https://api.github.com/repos/Alfresco/Aikau/contributors","subscribers_url":"https://api.github.com/repos/Alfresco/Aikau/subscribers","subscription_url":"https://api.github.com/repos/Alfresco/Aikau/subscription","commits_url":"https://api.github.com/repos/Alfresco/Aikau/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alfresco/Aikau/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alfresco/Aikau/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alfresco/Aikau/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alfresco/Aikau/contents/{+path}","compare_url":"https://api.github.com/repos/Alfresco/Aikau/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alfresco/Aikau/merges","archive_url":"https://api.github.com/repos/Alfresco/Aikau/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alfresco/Aikau/downloads","issues_url":"https://api.github.com/repos/Alfresco/Aikau/issues{/number}","pulls_url":"https://api.github.com/repos/Alfresco/Aikau/pulls{/number}","milestones_url":"https://api.github.com/repos/Alfresco/Aikau/milestones{/number}","notifications_url":"https://api.github.com/repos/Alfresco/Aikau/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alfresco/Aikau/labels{/name}","releases_url":"https://api.github.com/repos/Alfresco/Aikau/releases{/id}","deployments_url":"https://api.github.com/repos/Alfresco/Aikau/deployments","created_at":"2015-01-23T16:04:14Z","updated_at":"2016-06-23T13:27:38Z","pushed_at":"2016-08-01T15:29:24Z","git_url":"git://github.com/Alfresco/Aikau.git","ssh_url":"git@github.com:Alfresco/Aikau.git","clone_url":"https://github.com/Alfresco/Aikau.git","svn_url":"https://github.com/Alfresco/Aikau","homepage":null,"size":78894,"stargazers_count":48,"watchers_count":48,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":10,"forks":39,"open_issues":10,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173"},"html":{"href":"https://github.com/Alfresco/Aikau/pull/1173"},"issue":{"href":"https://api.github.com/repos/Alfresco/Aikau/issues/1173"},"comments":{"href":"https://api.github.com/repos/Alfresco/Aikau/issues/1173/comments"},"review_comments":{"href":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173/comments"},"review_comment":{"href":"https://api.github.com/repos/Alfresco/Aikau/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alfresco/Aikau/pulls/1173/commits"},"statuses":{"href":"https://api.github.com/repos/Alfresco/Aikau/statuses/d6cf57abdd5b7931373daec37a4f8d39e1a0d01a"}}}}
{"actor":{"display_login":"draperd"}}