51Testing软件测试论坛

标题: 请各位高手指点 [打印本页]

作者: 淡茶飘香    时间: 2008-12-20 04:38
标题: 请各位高手指点
在td中,我想在添加缺陷时,将缺陷分配给开发人员,但是Assigned to中用户是所有组的全部用户,怎么设置或使用流程控制语句能实现Assigned to的人员全部是开发人员呢
作者: wssgily    时间: 2008-12-20 08:48
QC中,view by group应该可以实现你的功能,然后把开发用户分在一个组中。
TD,忘记是不是也有这个功能了。
试一下,有什么问题再讨论.
作者: 飘渺的风    时间: 2008-12-20 10:32
Function Defects_Bug_CanPost
On Error Resume Next
  if Bug_Fields.Field("BG_STATUS").Value = "新建" and UserGroup(Bug_Fields("BG_RESPONSIBLE").Value) <> "研发工程师" then
     msgbox "请把新建的BUG单交给研发部门成员"
     Defects_Bug_CanPost = False
  End if
On Error GoTo 0
End Function

Function UserGroup (tuser)
         Dim Cust
         Dim CustUserGroups
         Dim CustGroup
         Set td = TDConnection
         Set Cust = td.Customization
             Cust.Load
         Set CustUserGroups = Cust.UsersGroups
         Set CustGroupList = CustUserGroups.Groups
             usergroup = ""
         For i = 1 To CustGroupList.Count
              Set CustGroup = CustUserGroups.Group(CustGroupList(i).Name)
              Set GroupUserList = CustGroup.UsersList
         For j = 1 To GroupUserList.Count
         If GroupUserList(j).Name = tuser Then
              usergroup = CustGroupList(i).Name
         Exit For
         End If
         Next
         If usergroup <> "" Then
          Exit For
         End if
         Next
         Set CustUserGroups = nothing
         Set CustGroupList = nothing
         Set CustGroup = nothing
         Set GroupUserList = nothing
         Set td = nothing
End Function

[ 本帖最后由 飘渺的风 于 2008-12-20 10:34 编辑 ]
作者: 飘渺的风    时间: 2008-12-20 10:38
这个不能对列表内容限制
只是对"BG_RESPONSIBLE"这个字段里的值做了一次检查
Bug_Fields.Field("BG_RESPONSIBLE").Value  必须在“研发工程师”那个分组内。

如果要对列表内容做限制,建议使用自定义字段。
作者: wssgily    时间: 2008-12-20 12:47
http://bbs.51testing.com/thread-110455-1-1.html
参考一下。
作者: 淡茶飘香    时间: 2008-12-21 11:56
谢谢各位的指点,在思路上有了扩展,不是仅限于原有的处理模式,我先试用一下,有问题再向各位请教!




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2