Skip to main content

skip to main content

developerWorks  >  Rational  >

Useful scripts to extend IBM Rational RequisitePro

Importing multiple documents and adding requirement hyperlinks

developerWorks
Document options

Document options requiring JavaScript are not displayed

Sample code


Rate this page

Help us improve this content


Level: Intermediate

Ankur Sharma (ankur_sharma@in.ibm.com), Staff software engineer, IBM

04 Dec 2007

These two add-ins for IBM® Rational® RequisitePro® offer the capability of 1) importing multiple documents, and 2) adding hyperlinks to document-based requirements.

Note: These add-ins for IBM® Rational® RequisitePro® are NOT official add-ins, and are not supported by IBM. These scripts are provided at the user's own risk. IBM does not promise any guaranteed support. The author strongly recommends that you try these add-ins with a dummy project first, as there may be some bugs in these add-ins.

Importing documents

This tool was developed to address issues where customers have requirements stored in huge numbers of documents and want to migrate them to ReqPro. Currently ReqPro allows you to import only one document at a time, hence the task of importing large numbers of documents is very tedious and time-consuming. This tool not only automates the import of documents simultaneously, but also helps in organizing them into different packages.

Share this...

digg Digg this story
del.icio.us Post to del.icio.us
Slashdot Slashdot it!

Installation instructions

  1. Install the following files to your system. You can extract these files from the attached zip file to the RequisitePro\Bin folder (where ReqPro is installed):
    • MassDocumentImport.exe
    • MassDocumentImport.mnu
  2. Start RequisitePro.
  3. From the menu, click Tools > Add-ins.
  4. Click Add.
  5. In the Name field, type Mass Document Import.
  6. Using the Browse button, provide the path to the MassDocumentImport.mnu file, that is, ...\RequisitePro\Bin\MassDocumentImport.mnu.
  7. Leave the other settings at their default values and click OK.

The Mass Document Import add-in is now installed and you can verify it by checking the Requirement menu in ReqPro. It should now have a Mass Document Import option.

Uninstallation instructions

  1. Open ReqPro.
  2. Click Tools > Add-ins.
  3. Select the Mass Document Import add-in.
  4. Click Remove.
  5. Delete the MassDocumentImport.exe and MassDocumentImport.mnu files from the installation folder.

Enabling trace logs

You can enable trace logs to check if you are facing any problem with the tool. Enabling the logs generates a MassDocumentImportError.Log file in the BIN folder where the ReqPro is installed. You will need this file if you are facing problems with the add-in. (see the Resources section at the end of this article for information on finding help with this script.)

Note: Turning on the logs may make the add-in slow.

To enable the logs, after installing the add-in do the following steps:

  1. Click Tools > Add-ins.
  2. Select the Mass Document Import add-in.
  3. Click the Edit button.
  4. Click the Edit button on the next "Add-in" dialog that opens. This will open the MassDocumentImport.mnu file in Notepad.
  5. Change the line Exec MassDocumentImport.exe to Exec MassDocumentImport.exe -log.
  6. Save the file and close it.
  7. Press Cancel in both the Add-in dialogs.

To enable verbose logs, repeat steps as above only change the line Exec MassDocumentImport.exe -log to Exec MassDocumentImport.exe -log -verbose.

To turn off the logs, change the line back to: Exec MassDocumentImport.exe.

How to use

Adding a single document to an import


To add a document for import, follow these steps:

  1. Start the add-in by choosing Requirement > Mass Document Import.
  2. Select a document type from the drop down list.
  3. Add the document using the Add File button or the Add File menu option.

The document is added to the list.


Adding all the documents from a directory to an import


To add all the documents from a directory to an import, follow these steps:

  1. Start the add-in by clicking Requirement > Mass Document Import.
  2. Select a document type from the drop-down list.
  3. Add the directory by using Add Directory button or the Add Directory menu option.

All the documents in the selected directory are added to the list.


Assigning a package to a document

To assign a package to a document, follow these steps:

  1. Select the document name in the list.
  2. Double-click the document name.
  3. Select the package from the Package Browser.
  4. The selected package will be displayed against the document.

The document will be imported to this selected package.


Assigning multiple documents to a package


To assign multiple documents to a package, follow these steps:

  1. Multi-select the documents in the list using Shift-Click or Control-Click.
  2. Click File > Assign Package.
  3. Select the package from the Package Browser.

The selected package will be displayed against the selected documents, and the documents will be imported to this package.


Importing documents


After assigning a package to the documents, click the Import button. There is no progress bar in this version, so have patience as the import progresses. After importing, the status will be displayed in front of each document.


Removing selected documents from an import list


  1. Select one or more documents in the list.
  2. Click File > Remove.

The selected documents will be removed from the list.


Removing all the documents from an import list


Note: Use this feature with caution.

  1. Click File > Remove All.

All the documents from all the document types will be removed.


Important: The location of the document is not changed. But the extension of the document is changed as per the document type you selected.



Back to top


Adding hyperlinks to document-based requirements

This utility allows the user to add hyperlinks to any document-based requirements, and provides two menu options to use through the Requirement menu.

Thus, if required, we can have the same requirements appearing in different documents meant for different audiences but the requirement is actually stored only in one of the documents. Whereas the other documents have the hyperlink to this requirement; there is a option of refreshing the hyperlinks to reflect the latest updated data as per the original document. The content of the hyperlink requirement can be configured to be either the requirement name, text, etc., using an .ini file.

Installation instructions

The files to be installed are:

  1. AddRequirementHyperlink.exe
  2. RefreshRequirementHyperlinks.exe
  3. RequirementHyperlinks.mnu
  4. RequirementHyperlink.ini

You can extract the files from the attached zip file to the: RequisitePro\Bin folder (where ReqPro is installed).

  1. Start ReqPro.
  2. Click Tools > Add-ins.
  3. Click Add.
  4. Enter Requirement Links in the Name field.
  5. Using the Browse button, provide the path to the RequirementHyperlinks.mnu file (...\RequisitePro\Bin\RequirementHyperlinks.mnu) .
  6. Leave the remaining settings at their default values, and click OK.

The Requirement Links add-in is now installed and you can verify it by checking the Requirement menu in ReqPro. It should have a Requirement Links option in it now. This menu option will also have two sub-options:

  • Add Requirement Hyperlink
  • Refresh Requirement Hyperlinks

Uninstallation instructions

  1. Open ReqPro.
  2. Click Tools > Add-ins.
  3. Select the Requirement Hyperlinks add-in.
  4. Click Remove.
  5. Now delete the following files from RequisitePro\Bin folder:
    • AddRequirementHyperlink.exe
    • RefreshRequirementHyperlinks.exe
    • RequirementHyperlinks.mnu
    • RequirementHyperlink.ini

How to use

Adding requirement hyperlinks


You can use this option to create hyperlinks to existing requirements. The format of the hyperlink can be controlled using the RequirementHyperlink.ini file.

This file controls how the requirements are created. Both the hyperlink text (format) and screentip text can be set. This file has a default section called [RequisitePro]. If the add-in doesn't find a section by the project's name, it uses the entries in this section. The entries of this default section can be overwritten by creating a new section by the project's name.

Any section needs to have two keys in it:

  • FORMAT key: The format key specifies the requirement hyperlink text.
  • SCREENTIP key: The screentip key specifies the text that appears when the mouse hovers over the hyperlink.

If any of these keys are missing, then the value of the key in the default ([RequisitePro]) section of the INI file is used. The key value can contain certain tags. These tags are replaced with appropriate values at runtime. For example, a <REQTEXT> tag is replaced by the requirement text of the selected requirement, while <REQNAME> is replaced by requirement name. The rest of the text (outside the tags) appears as-is.

Troubleshooting

  1. If the hyperlink does not appear as expected, ensure that the INI file is copied to the correct location.
  2. If the INI file is in the correct location, and still an unexpected result occurs, check the FORMAT settings in the INI file for that project. It might be picking up the default values.



Back to top


Downloads

DescriptionNameSizeDownload method
Script described in this articleMassDocumentImport.zip24KBHTTP
Script described in this articleRequirementHyperlinks.zip18KBHTTP
Information about download methods


Resources

Learn

Get products and technologies
  • See also the Rational RequisitePro area on developerWorks for requirements management content and resources.

  • Download IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.

Discuss


About the author

Ankur Sharma

Ankur Sharma works at IBM India Software Labs based in Bangalore. He has been involved in the development efforts for IBM Rational RequisitePro for more than a year. Ankur holds a Master's degree in Computer Applications and has been in the software industry since 2002.




Rate this page


Please take a moment to complete this form to help us better serve you.



YesNoDon't know
 


 


12345
Not
useful
Extremely
useful
 


Back to top