2 ################################################################################
5 # Description: Displays all remaining unlocked bugs
6 # Author: Andrew@DeFaria.com
7 # Created: Mon Jun 2 11:19:46 PDT 2003
10 # (c) Copyright 2001-2003, Andrew@DeFaria.com, all rights reserved.
12 ################################################################################
13 # Set me to command name
16 # Source /etc/site_parms
17 if [ -f /etc/site_parms ]; then
20 echo "$me: WARNING: /etc/site_parms does not exist!"
24 adm_base="$SITE_TOOLS_PATH/adm"
27 adm_fpath=${adm_fpath:-$adm_base/functions}
35 if [[ $USER != $ccadmin ]]; then
36 error "This command must be executed by $ccadmin" 1
39 # Set release_web_area
40 release_web_area=~adefaria/www/Internal/Release
43 view="$SITE_SNAPSHOT_VIEW_PATH/$SITE_OFFICIAL_VIEW/salira"
46 cqc="$SITE_TOOLS_PATH/bin/cqc"
48 # Cd there to operate on files
52 echo "$me: Error: Unable to cd to release web area"
56 # Current release is now stored in a file
57 current_release="$(cat addbug/current_release).bugs"
59 # Declare some counters
61 declare -i resolved_bugs=0
62 declare -i already_locked_bugs=0
63 declare -i locked_bugs=0
68 # Get and process a list of bugs
69 buglist=$(grep -ve ^# -e ^* "$current_release" | cut -f1)
71 # Must be in a view/vob context
75 echo "$me: Error: Unable cd to official view ($view)"
79 for bugid in $buglist; do
84 state=$($cqc $bugid state)
86 # Check to see if bug is already locked
87 locked=$(cleartool lslock -short lbtype:$bugid 2> /dev/null)
89 if [ "$locked" != "" ]; then
90 let locked_bugs=locked_bugs+1
91 elif [ "$state" = "Closed" -o "$state" = "Verified" ]; then
92 let locked_bugs=locked_bugs+1
94 let unlocked_bugs=unlocked_bugs+1
95 owner=$(cqc $bugid owner)
96 headline=$(cqc $bugid headline)
97 echo "Bug ID $bugid $state \"$headline\" <$owner@salira.com> is still unlocked"
102 echo -e "Bugs processed:\t\t$bugs"
103 echo -e "Locked bugs:\t\t$locked_bugs"
104 echo -e "Unlocked bugs:\t\t$unlocked_bugs"