Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Help setting detail dialog box values in QC 11

$
0
0

We have some custom code in the detail dialog box sub .  On existing defects, when the dialogbox is closed, it check if the status is from a status dropdown list.  If not, set it to the first value from the dropdown list.  The status values are in a lookup list which works fine for QC 9.2.   After upgrading to QC 11.5,  the code is failing.   The field BG_STATUS is set up as lookup list type and points to a valid lookup list.   I am not sure what the issue is, please any help would be greatly appreciated.

 

 

Sub Defects_DialogBox(DialogBoxName, IsOpen)

  On Error Resume Next

   if DialogBoxName = "Details" then

     if not IsOpen then

             If Not Cust_isInList(Bug_Fields("BG_STATUS").list, Bug_Fields("BG_STATUS").value) Then
            strOldValue = Bug_Fields("BG_STATUS").value
            strNewValue = Bug_Fields("BG_STATUS").list.Child(1).name
            strType = Bug_Fields("BG_USER_01").value
            Bug_Fields("BG_STATUS").value = strNewValue
            strMessage = "The status has been changed to """ & strNewValue & """, because """ & _
                         strOldValue & """ is not a valid status for the type of """ & strType & """."
            MsgBox strMessage, 0, "Information"
         End If

     end if

  end if

 

function Cust_isInList (tdList, strName)


  blnInList = False

  intCount = tdList.Count

   for i = 1 to intCount
      'strElement = tdList.Child(i).Name
      strElement = Lists.List
      if strComp ( strElement, strName, vbTextCompare) = 0 then
         blnInList = True
         exit for
      end if
   next
   Cust_isInList = blnInList

 

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>