To create a new standard field (read only numeric)(defect module)is required to list the number of Blocked Scripts, which will be automatically updated when a test failed script is associated with the defect and when the failed script is subsequently passed.

From test lab module , I have created one test set and now I run one of the test script manually and set it's status as failed, now I want to add a new defect to this failed script and then a new defect window will open, at that time i want to display 1 in Blocked Scripts field, but if the test script status is not failed then 0 will be displayed,

please help me out