Question & Answer
Question
How do you reconnect IBM Rational Change 5.2 with IBM Rational DOORS after the Rational DOORS server has been moved?
Cause
In a Rational Change for DOORS interface configuration the existing links from Rational Change to Rational DOORS are broken when the Rational DOORS server has been moved.
Answer
Note:
- This applies only to Rational Change 5.2 and 5.3 prior to Interim Fix 1 for 5.3.0.3. Although this should also work for Rational Change 5.3.0.3-001 and later, a simpler procedure is now available. See TechNote 1594172: How to update references to an integration server that was renamed.
- This only applies to the OSLC version of the DOORS-Change interface.
- This applies to Requirements Change Requests (RCR) only and not to Implementation Requests (IRs).
- The following procedure has been successfully tested on Linux and would need to be adapted for other operating systems.
Note: Before you begin.
- Verify this procedure first on a test database.
- Ensure you have a valid backup before following this procedure on a production database.
- This is not a script. The steps must be run separately at the Command Line Interface(CLI)
- "OLD_SERVER" and "NEW_SERVER" below refer to the old, resp. new Rational DOORS server-name or server-ipaddress.
- The Rational Synergy Classic Client CLI session must be running as a user with
ccm_admin
role.
All source code and/or binaries attached to or specified in this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
- Start a command prompt, create a working folder for the temp files and change directory (cd) to it.
mkdir /tmp/MM_conv
cd /tmp/MM_conv
- Query for all CRs which have the
tracksRequirement
attribute and format the output to create a script called "crfiles.sh
". In step 3, this script will output the contents of those attributes in individual files named after the CR's Component Version Identifier (cvid
) in each case. There will be one temp file for each CR in the database.
Note: The following command is to be on one line only.
ccm query -t problem "has_attr('tracksRequirement')" -u -f "ccm attr -s tracksRequirement @=%cvid > %cvid" > crfiles.sh
- Make the new script executable, and run it.
chmod 777 crfiles.sh
./crfiles.sh
- IMPORTANT: Make a copy of the working folder so that you have a set of saved files containing the original attribute values. If something goes wrong during the update, it will be easier to recover the original attributes using the files in this backup folder.
cd ..
cp -R MM_conv MM_backup
cd MM_conv
- Back in the working folder, replace all instances of the string "OLD_SERVER" with the string "NEW_SERVER" in every file in the folder.
find /tmp/MM_conv/ -type f -exec sed -i 's/<OLD_SERVER>/<NEW_SERVER>/g' {} +
- Save the default
text_editor
setting. ccm set role ccm_admin
ccm set text_editor_orig "'ccm set text_editor'"
- Create a new script called "
update.sh
" which will take a singlecvid
as an argument. This script redefines thetext_editor
to load the contents of a modified temp file into thetracksRequirement
attribute of a single CR. It uses thecvid
to uniquely map the temp file to the CR. You will use a for loop in step 9 to iterate though all CRs using the available temp files. The script must be written exactly as follows, and saved in the current folder.
#!/bin/sh -x
# Modify the text_editor to copy to contents of the file to the attribute
ccm set text_editor "cat /tmp/MM_conv/$1 > %filename"
# Modify the attribute on the object using passed cvid argument
ccm attr -m tracksRequirement @=$1
- Make the script executable.
chmod 777 update.sh
- Call this script for every file in the
MM_conv
directory excluding any files with extensions (for example the scripts).
for f in `ls |grep -v "\."` ; do ./update.sh "$f" ; done
- Check if there are any errors or warnings.
If not, test that the conversion has been successful in the database by starting Rationaql Change.
If there are any problems, you can use the backup files inMM_backup
to restore the attributes to the CR using the sameupdate.sh
script in theMM_backup
directory as in step 9.
- Clean up. Set the
text_editor
back to its previous value from step 6:
ccm set text_editor "'ccm set text_editor_orig'"
- Remove the saved value of the
text_editor
.
ccm unset text_editor_orig
Related Information
Was this topic helpful?
Document Information
Modified date:
13 November 2019
UID
swg21638072