We have a basic requirement which we are trying to implement using the workflow script editor in QC10.
Requirement is: in test plan, when the status of the test changes to '4', other two fields should become mandatory to populate (a user list and a look up list)
Having this requirement, we wrote something like this in the Test_FieldChange area:
If FieldName = "TS_STATUS" then
if Test_Fields.Field("TS_STATUS").Value = "4" then
Test_Fields.Field("TS_USER_02").IsRequired = true
Test_Fields.Field("TS_USER_04").IsRequired = true
Test_Fields.Field("TS_USER_02").IsRequired = false
Test_Fields.Field("TS_USER_04").IsRequired = false
The code above works to some extent. When the user changes the status to 4, both fields become required, but the look up list then goes to read only mode, and we're unable to fill it.
We also added the line:
Test_Fields.Field("TS_USER_02").IsReadOnly = false
but it makes no difference.
We tried with a different field (another look up list) and the behavior is exactly the same.
Also tried including that code in Tests_FieldCanChange but We don't see an improvement.
The group access was fine. We noticed that the fields of a test get moved to the top automatically if they become required. We also noticed that the first two fields from the left column are read read only.
By just changing the order and putting the fields we need at the bottom we can workaround this issue.