Skip to content

[utils]受入/検査がスキップされたタスク履歴番号を取得するメソッドを追加 #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 22, 2020

Conversation

yuji38kwmt
Copy link
Collaborator

close #107

Copy link

@unarist unarist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

受入側だけ見ましたが、多分検査も同様かと。

index_list.append(index)
else:
# 直後の履歴がない
index_list.append(index)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最後の履歴が受入フェーズで担当者なしというのは、受入未着手も含まれるのでは?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「受入フェーズで担当者なし」のタスクは、受入フェーズのタスク履歴がなかったため、問題ないかと思います。
「受入フェーズの担当者が割り当てられた」タスクは、受入フェーズのタスク履歴がありました。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とはいえ、「started_datetimeended_datetime`の両方がnullである」という条件を加えた方が確実だと思ったので、修正します。

"""
index_list = []
for index, history in enumerate(task_history_list):
if not (TaskPhase(history["phase"]) == TaskPhase.ACCEPTANCE and history["account_id"] is None):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作業時間が0であることも確認した方がよいのでは。ないと困る一例として、受入後のアノテーション一括編集とかがあります。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

メモ:受入完了状態のタスクに対してアノテーション一括編集すると、

  • 受入フェーズが追加される
  • 担当者はなし
  • 作業時間は0でない
    になる

if index + 1 < len(task_history_list):
# 直後の履歴あり
next_history = task_history_list[index + 1]
# 直後の履歴が受入の場合、受入がスキップされた履歴(提出取り消しではない)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

個人的な感想ですが、この説明の正しさを理解するのに少し時間がかかりました。

「直後が受入であること」ではなく「直後が前段のフェーズでないこと」とした方が、確かに提出取消ならそうなるはずだ、と理解しやすいのではないでしょうか。

Copy link
Collaborator Author

@yuji38kwmt yuji38kwmt Jan 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「直後が受入であること」ではなく「直後が前段のフェーズでないこと」とした方が、確かに提出取消ならそうなるはずだ、と理解しやすいのではないでしょうか。

「前段≠直前」で合っていますか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

たとえば3番目の履歴の「前段フェーズ」は検査でしょうか?教師付でしょうか?

@yuji38kwmt yuji38kwmt merged commit 2beec68 into master Jan 22, 2020
@yuji38kwmt yuji38kwmt deleted the 107-add-task-history-util branch January 24, 2020 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants