如果想在 V2EX 获得更好的推广效果,欢迎了解 PRO 会员机制:
https://www.v2ex.com/pro/about

如果你经常使用铜币置顶主题,持有 V2EX Solana Token 会在每日签到时获得额外铜币:
https://www.v2ex.com/solana
Cybozu0
V2EX  ›  推广

看板应用 teambition 和其他企业系统的整合

  •  
  •   Cybozu0 · Aug 14, 2020 · 1957 views
    This topic created in 2099 days ago, the information mentioned may be changed or developed.

    概要

    看板应用 teambition 企业 OA 系统 kintone

    我们希望能把自己企业 OA 系统(kintone)中的任务直接发布到外包企业的项目管理系统(teambition)上。

    效果图

    关键代码

            function genAppAccessToken(param) {
                const periodical = 3600;
                const iat = Math.floor(Date.now() / (1000 * periodical)) * periodical;
                const oHeader = {
                    alg: 'HS256',
                    typ: 'JWT'
                };
                const oPayload = {
                    iat:iat,
                    exp: iat + Math.floor(1.1 * periodical),
                    _appId: param.appId,
                };
                return KJUR.jws.JWS.sign('HS256', oHeader, oPayload, { utf8: param.appSecret });
            }
    
            function createTask(param) {
                const data = {
                    'operatorId': param.uid,
                    'projectId': param.projectId,
                    'templateId': param.templateId,
                    'content': param.content,
                    'priority': param.priority,
                    'visible': param.visible            }
                const options = ['tasklistId', 'taskgroupId', 'executorId', 'statusId', 'startDate', 'dueDate', 'note', 'parentTaskId', 'participants', 'customfields'];
                for (let i = 0; i < options.length; i++) {
                    param[options[i]] && (data[options[i]] = param[options[i]]);
                }
                return kintone.proxy('https://open.teambition.com/api/task/create', 'POST', {
                    'Content-Type': 'application/json',
                    'Authorization': 'Bearer ' + param.appAccessToken,
                    'X-Tenant-Id': param.orgId,
                    'X-Tenant-Type': 'organization'
                }, data);
            }
    

    具体实现请参考: 通过 kintone 发布 teambition 任务

    更多文章和演示:Kintone demo 环境

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5476 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 08:48 · PVG 16:48 · LAX 01:48 · JFK 04:48
    ♥ Do have faith in what you're doing.