There is a field that is setup as a dropdown list labeled ''project''.
http://screencast.com/t/QIUKaq008
http://screencast.com/t/6eGtVdOLQR
This dropdown list however is blank by default in Customization --> Project Lists
http://screencast.com/t/msrtxdDzgds
you would have to manually add your projects to the list then you could go through all the defects and select the correct project and any new projects would need to be manually added to this list.
The other option would be to add a custom field and then use the workflow to pull the project name from the TDConnection object
in Project customization you would need to go to project entities, click on Defects, and add a user defined field (make of note of the database column assigned (ex BG_USER_01).
Then you could go under workflow and add the following
under Defects Module Script --> Bug_New add the following
Sub Bug_New
On Error Resume Next
Dim bugProject
bugProject = TDConnection.ProjectName
Bug_Fields.Field(''BG_USER_01'').Value = bugProject
On Error GoTo 0
End Sub
Under Defects Module Script --> Bug_MoveTo add the following
Sub Bug_MoveTo
On Error Resume Next
Dim bugProject
bugProject = TDConnection.ProjectName
If Bug_Fields.Field(''BG_USER_01'') = '''' Then
Bug_Fields.Field(''BG_USER_01'').Value = bugProject
End If
On Error GoTo 0
End Sub
Now whenever you open a new bug the workflow will automatically add the project name to the Defect and anytime you move to an existing Defect it will check the field and add the project name if needed.