Topic
3 replies Latest Post - ‏2012-03-30T13:16:34Z by PriyaJ
PriyaJ
PriyaJ
48 Posts
ACCEPTED ANSWER

Pinned topic ClearQuest Action validation hook failed with error 'File Not Found'

‏2012-03-29T05:26:45Z |
Hi,

We are supporting IBM Rational ClearQuest Application. We have a ClearQuest schema which is used by a large user base as a defect tracking system. A state-based record 'PRCR' in the schema is used for it. When an user performed an action called Evaluate (CHANGE_STATE) on a PRCR record and tried to save the changes, the user is getting the following error.

'ERROR! Execution of a hook failed during the action Evaluate. It was the ACTION_VALIDATION hook attached to the PRCR "PRCRNO". The reason for the failure was:
File Not Found'

Note: User has three files attached in the Record (within the specified limit).

The Contents of the Evaluate Action validation hook are

***************************************************************************************************
' check to see that the Headline field contains value, validate it contains a value
Dim value_info
Set value_info = GetFieldValue("Headline")
If Len(value_info.GetValue()) < 1 Then
Defect_Validation = "The Title field must contain a detailed description, currently the field is empty."
End If

' Comment out the WriteMyHistory function call so that customized history is not logged(CRC) 01/05/04
' WriteMyHistory()
' Checking the siz of Attachments
Dim fso, f, s
Action_Item_Validation = ""
set session = GetSession()
set attachFields = AttachmentFields

' Iterate over the attachment fields on an Entity.
For Each attachField In attachFields
set attaches = attachField.Attachments
' iterate over the attachment's field attachments
For Each myAttach In attaches
filename = myAttach.FileName
filesize = myAttach.FileSize
' INFO "filenmae is " & filename
' File size is always 0 before a first commit
If (filesize = 0) Then
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filename)
filesize = f.size
End if
' INFO "filename is " & filename & " size is " & filesize
If filesize >= 1000000 Then
Action_Item_Validation = "File " & filename & " is too large, (10 MB max)"
Exit Function
End If
Next
Next
**************************************************************************************************
Can any one help us in this issue??

Thanks,
Priya J
Updated on 2012-03-30T13:16:34Z at 2012-03-30T13:16:34Z by PriyaJ
  • PriyaJ
    PriyaJ
    48 Posts
    ACCEPTED ANSWER

    Re: ClearQuest Action validation hook failed with error 'File Not Found'

    ‏2012-03-29T06:16:09Z  in response to PriyaJ
    Hi,

    In the three attachments, two are .exe files. When I have tried to remove the .exe file and save the PRCR record in any action, I am successful.

    Is there any restriction as to not attach executable files in the Attachments fields ??

    Thanks,
    Priya J
    • pdubovitsky
      pdubovitsky
      376 Posts
      ACCEPTED ANSWER

      Re: ClearQuest Action validation hook failed with error 'File Not Found'

      ‏2012-03-30T13:09:06Z  in response to PriyaJ
      // Is there any restriction as to not attach executable files in the Attachments fields ??

      It might be that the problem is caused by antivirus software or by browser policies (if you are using CQWeb).

      Pavel
  • PriyaJ
    PriyaJ
    48 Posts
    ACCEPTED ANSWER

    Re: ClearQuest Action validation hook failed with error 'File Not Found'

    ‏2012-03-30T13:16:34Z  in response to PriyaJ
    Thanks for the reply Pavel,

    The issue occurred only with that particular .exe file which has size as zero bytes. I removed that file and attached it again as a zip file, after which I am able to save the action.

    Thanks,
    Priya J