{"action":"created","comment":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/38493951","id":38493951,"diff_hunk":"@@ -1,8 +1,13 @@\n module Berkeley\n   class Departments\n \n-    def self.get(dept_code)\n-      department_map[dept_code] || dept_code\n+    def self.get(dept_code, concise=false)\n+      name = department_map[dept_code]\n+      if name\n+        concise ? name.sub('Department of ', '') : name\n+      else\n+        dept_code\n+      end","path":"app/models/berkeley/departments.rb","position":12,"original_position":12,"commit_id":"f0cdfb06e48d3be991c8d82c9f0a9b3fe2fc1390","original_commit_id":"f0cdfb06e48d3be991c8d82c9f0a9b3fe2fc1390","user":{"login":"paulkerschen","id":2413467,"avatar_url":"https://avatars.githubusercontent.com/u/2413467?v=3","gravatar_id":"","url":"https://api.github.com/users/paulkerschen","html_url":"https://github.com/paulkerschen","followers_url":"https://api.github.com/users/paulkerschen/followers","following_url":"https://api.github.com/users/paulkerschen/following{/other_user}","gists_url":"https://api.github.com/users/paulkerschen/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkerschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkerschen/subscriptions","organizations_url":"https://api.github.com/users/paulkerschen/orgs","repos_url":"https://api.github.com/users/paulkerschen/repos","events_url":"https://api.github.com/users/paulkerschen/events{/privacy}","received_events_url":"https://api.github.com/users/paulkerschen/received_events","type":"User","site_admin":false},"body":"@johncrossman This is a most excellent option to have. Do you think that using a couple of regular expressions might work to get us a concise name across the board? Glancing through the list of official names, it seems like we might get something short and identifiable with the rules:\r\n- Kill ' of ', ' for ', ' in ' and anything to the left;\r\n- Kill rightmost 'Department', 'Institute', 'Program', 'Programs', 'Academic Program'.\r\nDoes that seem workable to you, or too awkward to put in code?","created_at":"2015-09-02T02:25:07Z","updated_at":"2015-09-02T02:25:07Z","html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4152#discussion_r38493951","pull_request_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152","_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/38493951"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/4152#discussion_r38493951"},"pull_request":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152"}}},"pull_request":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152","id":43946776,"html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4152","diff_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4152.diff","patch_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4152.patch","issue_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4152","number":4152,"state":"open","locked":false,"title":"CLC-5719, pull dept spreadsheet from Drive with naming convention","user":{"login":"johncrossman","id":7606442,"avatar_url":"https://avatars.githubusercontent.com/u/7606442?v=3","gravatar_id":"","url":"https://api.github.com/users/johncrossman","html_url":"https://github.com/johncrossman","followers_url":"https://api.github.com/users/johncrossman/followers","following_url":"https://api.github.com/users/johncrossman/following{/other_user}","gists_url":"https://api.github.com/users/johncrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/johncrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncrossman/subscriptions","organizations_url":"https://api.github.com/users/johncrossman/orgs","repos_url":"https://api.github.com/users/johncrossman/repos","events_url":"https://api.github.com/users/johncrossman/events{/privacy}","received_events_url":"https://api.github.com/users/johncrossman/received_events","type":"User","site_admin":false},"body":"https://jira.ets.berkeley.edu/jira/browse/CLC-5719\r\nBamboo: https://bamboo.ets.berkeley.edu/bamboo/browse/MYB-CJT66-1\r\n\r\nAnother step towards ReportDiffTask:\r\n* option to pull concise department title per [requirements](https://confluence.ets.berkeley.edu/confluence/pages/viewpage.action?pageId=46142744)\r\n* reusable find_or_create_today_subfolder() code moves to Oec::Task\r\n* specs\r\n","created_at":"2015-09-02T01:57:11Z","updated_at":"2015-09-02T02:25:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92c5b7388f8243ebbb628a8307ea03d960d8ffb2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152/commits","review_comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152/comments","review_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4152/comments","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/f0cdfb06e48d3be991c8d82c9f0a9b3fe2fc1390","head":{"label":"johncrossman:CLC-5719_get_dept_spreadsheet","ref":"CLC-5719_get_dept_spreadsheet","sha":"f0cdfb06e48d3be991c8d82c9f0a9b3fe2fc1390","user":{"login":"johncrossman","id":7606442,"avatar_url":"https://avatars.githubusercontent.com/u/7606442?v=3","gravatar_id":"","url":"https://api.github.com/users/johncrossman","html_url":"https://github.com/johncrossman","followers_url":"https://api.github.com/users/johncrossman/followers","following_url":"https://api.github.com/users/johncrossman/following{/other_user}","gists_url":"https://api.github.com/users/johncrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/johncrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncrossman/subscriptions","organizations_url":"https://api.github.com/users/johncrossman/orgs","repos_url":"https://api.github.com/users/johncrossman/repos","events_url":"https://api.github.com/users/johncrossman/events{/privacy}","received_events_url":"https://api.github.com/users/johncrossman/received_events","type":"User","site_admin":false},"repo":{"id":23628046,"name":"calcentral","full_name":"johncrossman/calcentral","owner":{"login":"johncrossman","id":7606442,"avatar_url":"https://avatars.githubusercontent.com/u/7606442?v=3","gravatar_id":"","url":"https://api.github.com/users/johncrossman","html_url":"https://github.com/johncrossman","followers_url":"https://api.github.com/users/johncrossman/followers","following_url":"https://api.github.com/users/johncrossman/following{/other_user}","gists_url":"https://api.github.com/users/johncrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/johncrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncrossman/subscriptions","organizations_url":"https://api.github.com/users/johncrossman/orgs","repos_url":"https://api.github.com/users/johncrossman/repos","events_url":"https://api.github.com/users/johncrossman/events{/privacy}","received_events_url":"https://api.github.com/users/johncrossman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johncrossman/calcentral","description":"","fork":true,"url":"https://api.github.com/repos/johncrossman/calcentral","forks_url":"https://api.github.com/repos/johncrossman/calcentral/forks","keys_url":"https://api.github.com/repos/johncrossman/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johncrossman/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johncrossman/calcentral/teams","hooks_url":"https://api.github.com/repos/johncrossman/calcentral/hooks","issue_events_url":"https://api.github.com/repos/johncrossman/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/johncrossman/calcentral/events","assignees_url":"https://api.github.com/repos/johncrossman/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/johncrossman/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/johncrossman/calcentral/tags","blobs_url":"https://api.github.com/repos/johncrossman/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johncrossman/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johncrossman/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/johncrossman/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johncrossman/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/johncrossman/calcentral/languages","stargazers_url":"https://api.github.com/repos/johncrossman/calcentral/stargazers","contributors_url":"https://api.github.com/repos/johncrossman/calcentral/contributors","subscribers_url":"https://api.github.com/repos/johncrossman/calcentral/subscribers","subscription_url":"https://api.github.com/repos/johncrossman/calcentral/subscription","commits_url":"https://api.github.com/repos/johncrossman/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/johncrossman/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/johncrossman/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/johncrossman/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/johncrossman/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/johncrossman/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johncrossman/calcentral/merges","archive_url":"https://api.github.com/repos/johncrossman/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johncrossman/calcentral/downloads","issues_url":"https://api.github.com/repos/johncrossman/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/johncrossman/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/johncrossman/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/johncrossman/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johncrossman/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/johncrossman/calcentral/releases{/id}","created_at":"2014-09-03T16:25:09Z","updated_at":"2015-05-07T16:57:25Z","pushed_at":"2015-09-02T01:54:50Z","git_url":"git://github.com/johncrossman/calcentral.git","ssh_url":"git@github.com:johncrossman/calcentral.git","clone_url":"https://github.com/johncrossman/calcentral.git","svn_url":"https://github.com/johncrossman/calcentral","homepage":"https://calcentral.berkeley.edu","size":20499,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"ets-berkeley-edu:master","ref":"master","sha":"d36a32735bdf07f107dcc956e0a3186a886faa0a","user":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":5483921,"name":"calcentral","full_name":"ets-berkeley-edu/calcentral","owner":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ets-berkeley-edu/calcentral","description":"","fork":false,"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral","forks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/forks","keys_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/teams","hooks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/hooks","issue_events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/events","assignees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/tags","blobs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/languages","stargazers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/stargazers","contributors_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contributors","subscribers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscribers","subscription_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscription","commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/merges","archive_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/downloads","issues_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/releases{/id}","created_at":"2012-08-20T16:45:39Z","updated_at":"2015-08-21T21:12:02Z","pushed_at":"2015-09-02T01:57:12Z","git_url":"git://github.com/ets-berkeley-edu/calcentral.git","ssh_url":"git@github.com:ets-berkeley-edu/calcentral.git","clone_url":"https://github.com/ets-berkeley-edu/calcentral.git","svn_url":"https://github.com/ets-berkeley-edu/calcentral","homepage":"https://calcentral.berkeley.edu","size":36642,"stargazers_count":50,"watchers_count":50,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":2,"forks":55,"open_issues":2,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/4152"},"issue":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4152"},"comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4152/comments"},"review_comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152/comments"},"review_comment":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4152/commits"},"statuses":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/f0cdfb06e48d3be991c8d82c9f0a9b3fe2fc1390"}}}}