nhn-edu / team-task-collector
该项目用于收集团队成员的工作状态。并将收集到的结果列成清单,并注册为新的任务。
1.0.6
2020-02-11 00:00 UTC
Requires
- nhn-edu/php-dooray: ~1.0.1.6
README
该项目用于收集团队成员的工作状态。并将收集到的结果列成清单,并注册为新的任务。
💾 安装
此示例项目可以使用包管理器或直接下载源代码来使用。然而,我们强烈建议使用包管理器。如果您自行安装,您需要自行解决 "https://github.com/eric-nhnedu/php-dooray" 依赖问题。
通过包管理器
此SDK已在两个包管理器中注册,composer。您可以使用包管理器提供的命令方便地安装它。当使用composer时,请确保在PHP 5.6+已安装的环境中运行。
composer
$ composer create-project nhn-edu/team-task-collector example-app
🔨 使用方法
使用SDK需要个人认证令牌。按照以下步骤获取个人认证令牌。
准备
- 登录Dooray PC Web。
- 点击屏幕右上角的齿轮图标(내설정;我的设置)。
- 点击[설정;设置]按钮。
- 点击API菜单并点击"개인 인증 토큰;个人认证令牌"菜单。
- 点击"인증 토큰 생성하기;生成认证令牌"按钮。
- 在"용도;用途"字段中填写合适的描述并点击"생성하기;创建"按钮。
- 点击"복사하기;复制"按钮将"인증 토큰;认证令牌"复制到剪贴板。
修复配置
编辑config.json文件
{
"__COMMENT__$$1" : [
"-- Enter your personal authentication token and tenant ID values below. --"
],
"AUTH_KEY" : "-- YOUR AUTH KEY HERE --",
"TENANT_ID" : "-- YOUR TENANT DOMAIN HOST NAME --",
"__COMMENT__$$2" : [
"-- Enter the email address of the employee you want to monitor. --"
],
"EMPLOYEE_EMAILS" : [
"employee1@your-company.com",
"employee2@your-company.com",
"employee3@your-company.com"
],
"__COMMENT__$$3" : [
"-- Enter the ID value of the project where the job is registered. --",
"Check the address bar of your web browser on your PC:",
" https://{tenant-ID}.dooray.com/project/{project-ID}"
],
"PROJECT_IDS" : [
"1234567890123456789",
"2345678901234567890"
],
"__COMMENT__$$4" : [
"-- Enter the start/end date and time of the search period in ISO8601 format. --",
" eg. 2022-01-01T00:00:00+09:00"
],
"SEARCH_BEGIN_DATE" : "2022-01-01T00:00:00+00:00",
"SEARCH_DUE_DATE" : "{today}+00:00",
"__COMMENT__$$5" : [
"-- [Additional Feature, Notification] --",
"Enter the Dooray Messenger Hook URL below to receive notifications. (optional) --"
],
"NOTIFY_TARGET_PROJECT_ID" : "3456789012345678901",
"NOTIFY_TASK_SUBJECT" : "[Summary] IAMSCHOOL Dev. Team {today}",
"NOTIFY_TASK_REGISTER_EACH" : false,
"NOTIFY_MESSENGER_HOOK_URL" : "https://hook.dooray.com/services/2049115262726134450/3205835367300737562/9fVoDjpsSw6wbm7Z1qBjHg",
"NOTIFY_MESSENGER_TEXT" : "Team work status has been registered.\nCheck each one to see if there are any tasks that I have forgotten.\n\n{url}\n\nHave a good day!",
"__COMMENT__$$6" : [
"-- [Additional Feature, Clean-up Task] --",
"If you turn on the option below, tasks that have been neglected for a long time are completed. --"
],
"CLEANUP_MODE" : true,
"CLEANUP_DELAY_DAYS_AFTER_REGISTRATION" : 365,
"CLEANUP_LOG_MESSAGE" : "This task has been neglected for more than `365 days`, so I changed the task status to Completed."
}
运行
PHP代码
<?php require ('../vendor/autoload.php'); use NhnEdu\TeamTaskCollector\TaskCollector; $collector = new TaskCollector('config.json'); $collector->run();