Skip to content
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

FunctionalCI新增联系人(contacts)字段 #7

Closed
annProg opened this issue May 25, 2016 · 9 comments
Closed

FunctionalCI新增联系人(contacts)字段 #7

annProg opened this issue May 25, 2016 · 9 comments

Comments

@annProg
Copy link
Collaborator

annProg commented May 25, 2016

域名只与app相关,因此该字段需要首先查询APP所属团队,然后获取团队人员列表,在更新域名的contacts字段,与#2类似,需要在Team及APP类中去更新该字段(APP变更联系团队,或者团队成员变更)

@annProg
Copy link
Collaborator Author

annProg commented May 25, 2016

也可以不实现此功能,用OQL查询或许也能实现类似功能。

另外,设置Team和Person的relation之后,影响分析图也能显示联系人。

@annProg
Copy link
Collaborator Author

annProg commented Sep 24, 2016

改为在FunctionalCI中添加contacts字段

@annProg annProg changed the title 域名新增联系人(contacts)字段 FunctionalCI新增联系人(contacts)字段 Sep 24, 2016
@annProg
Copy link
Collaborator Author

annProg commented Sep 27, 2016

增加contacts字段不太现实,更新一个lnk关系需要些很多次数据库,还容易引发mysql lock,效率低下。

考虑扩展方式新增一个批量查询页面,利用apicore/get_related直接显示csv格式的查询结果

不使用api,也可以用下面的方法

$oRelGraph = MetaModel::GetRelatedObjectsDown($sRelation, $aSourceObjects, $iMaxRecursionDepth);
$aResults = $oRelGraph->GetObjectsByClass();

@annProg
Copy link
Collaborator Author

annProg commented Sep 27, 2016

用core/get_related报警可能比较好用,但是批量查询联系人,可能效率会比较低。输出的格式不方便一一对应。

联系人批量查询可能的解决方案:core/get获取,取 linkset(xxx_list)

@annProg
Copy link
Collaborator Author

annProg commented Sep 27, 2016

接上一条,如果联系人的friendlyname设置为email(phone)形式,那么会很方便,一次查询结果全出来

@annProg
Copy link
Collaborator Author

annProg commented Sep 28, 2016

更新,新增一个rest接口,查询impact的联系人的详细信息,支持output_fields

@annProg
Copy link
Collaborator Author

annProg commented Nov 11, 2016

直接让export支持导出 _list 会更直接,更彻底的解决方案。
例如,将list转为以分号分隔的字符串,然后导出

@annProg
Copy link
Collaborator Author

annProg commented Apr 20, 2017

用触发器解决。需要开发trigger-onupdate(能追踪 _list的变化),action-shell-exec等功能

@annProg
Copy link
Collaborator Author

annProg commented Apr 25, 2017

接上一条,直接创建lnkContactToFunctionalCI不能触发FunctionalCI的 contacts_list 更新,需要新触发器,新建和删除对象的时候触发,已自带create触发器,需要开发delete触发器

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant