SDK code that allows users to search a requirement’s discussions for a specific string
There is currently no functionality within the CaliberRM client to allow you to search for a string within a requirement’s discussions. It is possible via the SDK however.
Attached is a sample C# .NET Project that demonstrates how this can be achieved. The logic for the code is as follows:
- For a selected project, iterates through all the requirements
- If a requirement contains a discussion, it will compare the string within the body of the discussion messages with the text entered into the ‘Search string’ text box (ignoring the case)
- If there is a match, the following information is output to a results.txt on the C:/ drive; Current Project Name, Requirement ID & Name, Discussion Message, Discussion Body, Requirement Owner.
To run the code:
1. Download the attached ‘SearchDiscussions.zip’ .NET project
2. Unzip and navigate to ‘\SearchDiscussions\Discussions\bin\Debug’
3. Run the Discussions.exe
4. Enter Host, Username and Password then click on Login
5. Click on ‘Populate’ to fill the combo box with projects (may take some time depending on database size)
6. Select project you wish to search on, enter your search string then click on Run
7. A message box with the title ‘Done’ will appear once the search completes and a report.txt will be created on the root of your c:\ drive with the results
You can also open the ‘Discussions.sln’ within Visual Studio 2010 to view, modify or run the sample code.