Setting up custom notifications in QC10
Question ID: 104032
0
0

How can I send custom notifications when tests are checked in and out of Quality Center?

Marked as spam
Posted by (Questions: 6, Answers: 5)
Asked on February 5, 2010 2:30 pm
32 views
Answers (3)
0
Private answer

How to send custom notifications when tests are checked in and out

Business Rules

  1. Emails are sent each time a Test is checked in or out.
  2. Emails are sent to the Tester entered in the Responsible Tester field.
  3. When a Responsible Tester does not have an email address, an email is sent to the Quality Center Administrator, in this example QC_Admin@JSR.com. Customize the pQCAdmin variable for your own environment.
  4. The history of changes are included in the email for the Test fields with the history flag checked in the Project Entities Test Field Settings.

Example
In the Common Scripts section

  1. Update the ActionCanExecute script
  2. Add the new custom script Function Custom_Notification_Tests

     Function ActionCanExecute(ActionName)
        Select case ActionName
        case ''act_vcs_checkout''
            Custom_Notification_Tests ''Checkout''
        case ''act_vcs_checkin''
            Custom_Notification_Tests ''Checkin''
        End Select
    ActionCanExecute = True
    End Function
    
    
    Function Custom_Notification_Tests (NotifyType)
    Dim tdc
    Dim objFactory
    Dim list
    
    
    Set tdc = TDConnection
    Set objFactory = tdc.testFactory
    Set theFilter = objFactory.Filter 
    
    
    'Change for your own environment
    'Send the email to the Quality Center Administrator
    
    
    pQCAdmin = ''QC_Admin@JSR.com'' 
    Author = Test_Fields.Field(''TS_RESPONSIBLE'').Value
    pEmail = tdc.Customization.Users.User(Author).Email
    
    
    If len(pEmail)<1 Then 'If Author's email address is blank
        pEmail = pQCAdmin 'Send the email to the Quality Center Administrator
        Author = pEmail 'Change for your own environment
    End If
    
    
    Id = Test_Fields.Field(''TS_TEST_ID'').Value
    theFilter.Filter(''TS_TEST_ID'') = Id
    Set List = theFilter.NewList
    
    
    If List.Count > 0 Then
        Set theItem = List.Item(1)
        strTo = Author
        StrSubject = NotifyType & '' - Change NotIfication: '' & Id
        strComment = strSubject
        theItem.Mail strTo,,2,strSubject,strComment 'Send the email
    End If
    
    
    Set tdc = nothing
    Set objFactory = nothing
    Set theFilter = nothing
    Set List = nothing
    
    
    End Function
    
Marked as spam
Posted by (Questions: 6, Answers: 167)
Answered on February 5, 2010 4:46 pm
0
Private answer

I have code similar to this for act_vcs_checkin to send an email. However a user may check in multiple tests using the action act_vcs_pending_checkins. I know I need a looping mechanism for the emails, but what do I look for to get the number of tests actually check in? Thanks

Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on June 26, 2012 8:52 am
0
Private answer

bump to the top

Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on June 27, 2012 4:25 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top