Highlighted
Priyotosh_ganguly Respected Contributor.
Respected Contributor.
89 views

TC_PLAN_SCHEDULING_DATE read only if a Test Case passed

when Test Cases are added in a Test Set, we get the TC_PLAN_SCHEDULING_DATE from the user.

Currently, even if the Test Case is passed, user can go to execution, open the Test Instance and edit the Planned Scheduled date. 

I need to make this field as read only if a Test case is passed.

Can you please help.

0 Likes
5 Replies
Priyotosh_ganguly Respected Contributor.
Respected Contributor.

Re: TC_PLAN_SCHEDULING_DATE read only if a Test Case passed

Any help would be wonderful.

0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: TC_PLAN_SCHEDULING_DATE read only if a Test Case passed

In TestSetTests_MoveTo:

    If TestSetTest_Fields("TC_STATUS").Value = "Passed" Then
        TestSetTest_Fields("TC_PLAN_SCHEDULING_DATE").IsReadOnly = True
    Else
        TestSetTest_Fields("TC_PLAN_SCHEDULING_DATE").IsReadOnly = False
    End If
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Priyotosh_ganguly Respected Contributor.
Respected Contributor.

Re: TC_PLAN_SCHEDULING_DATE read only if a Test Case passed

I know it's pretty straight forward. But.

Sub TestSetTests_MoveTo
On Error Resume Next
If TestSetTest_Fields("TC_STATUS").Value = "Passed" Then
TestSetTest_Fields("TC_PLAN_SCHEDULING_DATE").IsReadOnly = True
Msgbox "Passed"
Else
TestSetTest_Fields("TC_PLAN_SCHEDULING_DATE").IsReadOnly = False
Msgbox "Not Passed"
End If
On Error GoTo 0
End Sub

with the above code, I could generate the message accordingly but planned execution date is not getting read only.

0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: TC_PLAN_SCHEDULING_DATE read only if a Test Case passed

Yes, it does. Only if you have the dialog open you won't see it immediately. Try closing the dialog, then open it again.
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Priyotosh_ganguly Respected Contributor.
Respected Contributor.

Re: TC_PLAN_SCHEDULING_DATE read only if a Test Case passed

Hi Jan,
It does. But if I click on the Test Instance name, it opens the Test Instance. There in details, Planned execution date is editable. If I go to that corresponding Test Instance, change the date and come back, the change is saved and shown as read only.
Is there any way to prevent this?
Thanks a lot for your kind reply.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.