{"action":"created","comment":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/comments/38857377","id":38857377,"diff_hunk":"@@ -105,30 +105,70 @@ class CycleTaskGroupColumnHandler(ParentColumnHandler):\n   def __init__(self, row_converter, key, **options):\n     \"\"\" init task group handler \"\"\"\n     self.parent = CycleTaskGroup\n-    super(CycleTaskGroupColumnHandler, self).__init__(row_converter, key, **options)\n+    super(CycleTaskGroupColumnHandler, self) \\\n+        .__init__(row_converter, key, **options)\n \n \n class TaskDateColumnHandler(ColumnHandler):\n \n   \"\"\" handler for start and end columns in task group tasks \"\"\"\n \n+  quarterly_names = {\n+      1: \"Jan/Apr/Jul/Oct\",\n+      2: \"Feb/May/Aug/Nov\",\n+      3: \"Mar/Jun/Sep/Dec\",\n+  }\n+\n   def parse_item(self):\n     \"\"\" parse start and end columns fow workflow tasks\n-\n-    Parsed item will be in d, m, y order, with possible missisg y.\n     \"\"\"\n+    raw_parts = self.raw_value.lower().split(\" \")\n+    if len(raw_parts) == 2:\n+      quarter_name, day = raw_parts\n+      for month, quarter in self.quarterly_names.items():\n+        if quarter.lower() == quarter_name:\n+          try:\n+            return [month, int(day)]\n+          except ValueError:\n+            self.add_error(errors.WRONG_VALUE_ERROR,\n+                           column_name=self.display_name)\n+            return\n+    raw_parts = self.raw_value.split(\"/\")\n     try:\n-      value = [int(v) for v in self.raw_value.split(\"/\")]\n-      if len(value) > 1:\n-        tmp = value[0]\n-        value[0] = value[1]\n-        value[1] = tmp\n-      else:\n-        value.append(0)\n-      return value\n+      return map(int, raw_parts)\n     except ValueError:\n-      self.add_error(errors.WRONG_VALUE_ERROR, column_name=self.display_name)\n-    return None\n+      self.add_error(errors.WRONG_VALUE_ERROR,\n+                     column_name=self.display_name)\n+      return\n+\n+  def get_value(self):\n+    start = \"start\" in self.key\n+    obj = self.row_converter.obj\n+    freq = obj.task_group.workflow.frequency\n+    date = getattr(obj, \"start_date\" if start else \"end_date\", None)\n+    month = getattr(obj, \"relative_start_month\" if start\n+                    else \"relative_end_month\", None)\n+    day = getattr(obj, \"relative_start_day\" if start\n+                       else \"relative_end_day\", None)\n+    if freq == \"one_time\":\n+      if date is None:\n+        return \"\"\n+      return \"{}/{}/{}\".format(date.month, date.day, date.year)\n+    elif freq in [\"weekly\", \"monthly\"]:\n+      if day is None:\n+        return \"\"\n+      return str(day)\n+    elif freq == \"quarterly\":\n+      quarter = self.quarterly_names.get(month, None)\n+      if None in [day, quarter]:\n+        return \"\"\n+      return \"{} {}\".format(quarter, day)","path":"src/ggrc_workflows/converters/handlers.py","position":74,"original_position":74,"commit_id":"0da88b54db3fab887bfd88b2abe30bc7a2d06a34","original_commit_id":"9c872800d277a159a7ba5841b546d42110523a1b","user":{"login":"uskudnik","id":120451,"avatar_url":"https://avatars.githubusercontent.com/u/120451?v=3","gravatar_id":"","url":"https://api.github.com/users/uskudnik","html_url":"https://github.com/uskudnik","followers_url":"https://api.github.com/users/uskudnik/followers","following_url":"https://api.github.com/users/uskudnik/following{/other_user}","gists_url":"https://api.github.com/users/uskudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/uskudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uskudnik/subscriptions","organizations_url":"https://api.github.com/users/uskudnik/orgs","repos_url":"https://api.github.com/users/uskudnik/repos","events_url":"https://api.github.com/users/uskudnik/events{/privacy}","received_events_url":"https://api.github.com/users/uskudnik/received_events","type":"User","site_admin":false},"body":"Nope - this output becomes `Jan/Apr/Jul/Oct 12`.","created_at":"2015-09-07T12:17:04Z","updated_at":"2015-09-07T12:17:04Z","html_url":"https://github.com/google/ggrc-core/pull/3069#discussion_r38857377","pull_request_url":"https://api.github.com/repos/google/ggrc-core/pulls/3069","_links":{"self":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/comments/38857377"},"html":{"href":"https://github.com/google/ggrc-core/pull/3069#discussion_r38857377"},"pull_request":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/3069"}}},"pull_request":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/3069","id":43972468,"html_url":"https://github.com/google/ggrc-core/pull/3069","diff_url":"https://github.com/google/ggrc-core/pull/3069.diff","patch_url":"https://github.com/google/ggrc-core/pull/3069.patch","issue_url":"https://api.github.com/repos/google/ggrc-core/issues/3069","number":3069,"state":"open","locked":false,"title":"CORE-2318 & CORE-2320 task dates on import/export ","user":{"login":"edofic","id":597476,"avatar_url":"https://avatars.githubusercontent.com/u/597476?v=3","gravatar_id":"","url":"https://api.github.com/users/edofic","html_url":"https://github.com/edofic","followers_url":"https://api.github.com/users/edofic/followers","following_url":"https://api.github.com/users/edofic/following{/other_user}","gists_url":"https://api.github.com/users/edofic/gists{/gist_id}","starred_url":"https://api.github.com/users/edofic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edofic/subscriptions","organizations_url":"https://api.github.com/users/edofic/orgs","repos_url":"https://api.github.com/users/edofic/repos","events_url":"https://api.github.com/users/edofic/events{/privacy}","received_events_url":"https://api.github.com/users/edofic/received_events","type":"User","site_admin":false},"body":"This implements export of dates on workflow (not cycle!) tasks and fixes import of tasks to accept exported csv.","created_at":"2015-09-02T09:47:03Z","updated_at":"2015-09-07T12:17:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1edd2a669dc988745a58efead328ed8ed81ffd3","assignee":null,"milestone":{"url":"https://api.github.com/repos/google/ggrc-core/milestones/18","html_url":"https://github.com/google/ggrc-core/milestones/0.9.4-Plum-P2","labels_url":"https://api.github.com/repos/google/ggrc-core/milestones/18/labels","id":1276098,"number":18,"title":"0.9.4-Plum-P2","description":null,"creator":{"login":"Smotko","id":513444,"avatar_url":"https://avatars.githubusercontent.com/u/513444?v=3","gravatar_id":"","url":"https://api.github.com/users/Smotko","html_url":"https://github.com/Smotko","followers_url":"https://api.github.com/users/Smotko/followers","following_url":"https://api.github.com/users/Smotko/following{/other_user}","gists_url":"https://api.github.com/users/Smotko/gists{/gist_id}","starred_url":"https://api.github.com/users/Smotko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smotko/subscriptions","organizations_url":"https://api.github.com/users/Smotko/orgs","repos_url":"https://api.github.com/users/Smotko/repos","events_url":"https://api.github.com/users/Smotko/events{/privacy}","received_events_url":"https://api.github.com/users/Smotko/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":16,"state":"open","created_at":"2015-08-27T16:20:13Z","updated_at":"2015-09-06T14:49:38Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/google/ggrc-core/pulls/3069/commits","review_comments_url":"https://api.github.com/repos/google/ggrc-core/pulls/3069/comments","review_comment_url":"https://api.github.com/repos/google/ggrc-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/ggrc-core/issues/3069/comments","statuses_url":"https://api.github.com/repos/google/ggrc-core/statuses/0da88b54db3fab887bfd88b2abe30bc7a2d06a34","head":{"label":"edofic:feature/CORE-2318-task-export","ref":"feature/CORE-2318-task-export","sha":"0da88b54db3fab887bfd88b2abe30bc7a2d06a34","user":{"login":"edofic","id":597476,"avatar_url":"https://avatars.githubusercontent.com/u/597476?v=3","gravatar_id":"","url":"https://api.github.com/users/edofic","html_url":"https://github.com/edofic","followers_url":"https://api.github.com/users/edofic/followers","following_url":"https://api.github.com/users/edofic/following{/other_user}","gists_url":"https://api.github.com/users/edofic/gists{/gist_id}","starred_url":"https://api.github.com/users/edofic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edofic/subscriptions","organizations_url":"https://api.github.com/users/edofic/orgs","repos_url":"https://api.github.com/users/edofic/repos","events_url":"https://api.github.com/users/edofic/events{/privacy}","received_events_url":"https://api.github.com/users/edofic/received_events","type":"User","site_admin":false},"repo":{"id":36659264,"name":"ggrc-core","full_name":"edofic/ggrc-core","owner":{"login":"edofic","id":597476,"avatar_url":"https://avatars.githubusercontent.com/u/597476?v=3","gravatar_id":"","url":"https://api.github.com/users/edofic","html_url":"https://github.com/edofic","followers_url":"https://api.github.com/users/edofic/followers","following_url":"https://api.github.com/users/edofic/following{/other_user}","gists_url":"https://api.github.com/users/edofic/gists{/gist_id}","starred_url":"https://api.github.com/users/edofic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edofic/subscriptions","organizations_url":"https://api.github.com/users/edofic/orgs","repos_url":"https://api.github.com/users/edofic/repos","events_url":"https://api.github.com/users/edofic/events{/privacy}","received_events_url":"https://api.github.com/users/edofic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edofic/ggrc-core","description":"GGRC Core","fork":true,"url":"https://api.github.com/repos/edofic/ggrc-core","forks_url":"https://api.github.com/repos/edofic/ggrc-core/forks","keys_url":"https://api.github.com/repos/edofic/ggrc-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edofic/ggrc-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edofic/ggrc-core/teams","hooks_url":"https://api.github.com/repos/edofic/ggrc-core/hooks","issue_events_url":"https://api.github.com/repos/edofic/ggrc-core/issues/events{/number}","events_url":"https://api.github.com/repos/edofic/ggrc-core/events","assignees_url":"https://api.github.com/repos/edofic/ggrc-core/assignees{/user}","branches_url":"https://api.github.com/repos/edofic/ggrc-core/branches{/branch}","tags_url":"https://api.github.com/repos/edofic/ggrc-core/tags","blobs_url":"https://api.github.com/repos/edofic/ggrc-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edofic/ggrc-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edofic/ggrc-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/edofic/ggrc-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edofic/ggrc-core/statuses/{sha}","languages_url":"https://api.github.com/repos/edofic/ggrc-core/languages","stargazers_url":"https://api.github.com/repos/edofic/ggrc-core/stargazers","contributors_url":"https://api.github.com/repos/edofic/ggrc-core/contributors","subscribers_url":"https://api.github.com/repos/edofic/ggrc-core/subscribers","subscription_url":"https://api.github.com/repos/edofic/ggrc-core/subscription","commits_url":"https://api.github.com/repos/edofic/ggrc-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/edofic/ggrc-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/edofic/ggrc-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/edofic/ggrc-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/edofic/ggrc-core/contents/{+path}","compare_url":"https://api.github.com/repos/edofic/ggrc-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edofic/ggrc-core/merges","archive_url":"https://api.github.com/repos/edofic/ggrc-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edofic/ggrc-core/downloads","issues_url":"https://api.github.com/repos/edofic/ggrc-core/issues{/number}","pulls_url":"https://api.github.com/repos/edofic/ggrc-core/pulls{/number}","milestones_url":"https://api.github.com/repos/edofic/ggrc-core/milestones{/number}","notifications_url":"https://api.github.com/repos/edofic/ggrc-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edofic/ggrc-core/labels{/name}","releases_url":"https://api.github.com/repos/edofic/ggrc-core/releases{/id}","created_at":"2015-06-01T12:28:36Z","updated_at":"2015-06-01T12:28:40Z","pushed_at":"2015-09-07T12:16:56Z","git_url":"git://github.com/edofic/ggrc-core.git","ssh_url":"git@github.com:edofic/ggrc-core.git","clone_url":"https://github.com/edofic/ggrc-core.git","svn_url":"https://github.com/edofic/ggrc-core","homepage":null,"size":39376,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"develop"}},"base":{"label":"google:develop","ref":"develop","sha":"9befc9d484887fb659c4ceea62cec84374f5175b","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":9304637,"name":"ggrc-core","full_name":"google/ggrc-core","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/ggrc-core","description":"GGRC Core","fork":false,"url":"https://api.github.com/repos/google/ggrc-core","forks_url":"https://api.github.com/repos/google/ggrc-core/forks","keys_url":"https://api.github.com/repos/google/ggrc-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/ggrc-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/ggrc-core/teams","hooks_url":"https://api.github.com/repos/google/ggrc-core/hooks","issue_events_url":"https://api.github.com/repos/google/ggrc-core/issues/events{/number}","events_url":"https://api.github.com/repos/google/ggrc-core/events","assignees_url":"https://api.github.com/repos/google/ggrc-core/assignees{/user}","branches_url":"https://api.github.com/repos/google/ggrc-core/branches{/branch}","tags_url":"https://api.github.com/repos/google/ggrc-core/tags","blobs_url":"https://api.github.com/repos/google/ggrc-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/ggrc-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/ggrc-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/ggrc-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/ggrc-core/statuses/{sha}","languages_url":"https://api.github.com/repos/google/ggrc-core/languages","stargazers_url":"https://api.github.com/repos/google/ggrc-core/stargazers","contributors_url":"https://api.github.com/repos/google/ggrc-core/contributors","subscribers_url":"https://api.github.com/repos/google/ggrc-core/subscribers","subscription_url":"https://api.github.com/repos/google/ggrc-core/subscription","commits_url":"https://api.github.com/repos/google/ggrc-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/ggrc-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/ggrc-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/ggrc-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/ggrc-core/contents/{+path}","compare_url":"https://api.github.com/repos/google/ggrc-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/ggrc-core/merges","archive_url":"https://api.github.com/repos/google/ggrc-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/ggrc-core/downloads","issues_url":"https://api.github.com/repos/google/ggrc-core/issues{/number}","pulls_url":"https://api.github.com/repos/google/ggrc-core/pulls{/number}","milestones_url":"https://api.github.com/repos/google/ggrc-core/milestones{/number}","notifications_url":"https://api.github.com/repos/google/ggrc-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/ggrc-core/labels{/name}","releases_url":"https://api.github.com/repos/google/ggrc-core/releases{/id}","created_at":"2013-04-08T19:16:28Z","updated_at":"2015-08-19T07:29:37Z","pushed_at":"2015-09-07T12:16:56Z","git_url":"git://github.com/google/ggrc-core.git","ssh_url":"git@github.com:google/ggrc-core.git","clone_url":"https://github.com/google/ggrc-core.git","svn_url":"https://github.com/google/ggrc-core","homepage":null,"size":71968,"stargazers_count":34,"watchers_count":34,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":21,"forks":26,"open_issues":21,"watchers":34,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/3069"},"html":{"href":"https://github.com/google/ggrc-core/pull/3069"},"issue":{"href":"https://api.github.com/repos/google/ggrc-core/issues/3069"},"comments":{"href":"https://api.github.com/repos/google/ggrc-core/issues/3069/comments"},"review_comments":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/3069/comments"},"review_comment":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/3069/commits"},"statuses":{"href":"https://api.github.com/repos/google/ggrc-core/statuses/0da88b54db3fab887bfd88b2abe30bc7a2d06a34"}}}}