#!/bin/rc

all=/n/axosoft/local/defects/all


if(! test -e /srv/axosoft)
	axofs -s axosoft -m /n/axosoft
if(! test -e /n/axosoft/users)
	mount /srv/axosoft /n/axosoft

cd $all

fn listall {
	@{
	
		ls | while(i=`{read})
			if(grep -s 'Under Observation' $i/workflow})
				echo $i '#' `{cat $i/priority} '#' `{cat $i/status} '#' `{cat $i/name} |
					awk -F '#' '{ printf("axosoft %-8s # %-8s %-10s %s\n", $1, $2, $3, $4);}'
	
	} 
}

fn detail {
	cd $1
	ls > /dev/null
	echo $1 `{cat workflow}, `{cat priority} priority, `{cat creator}, `{cat created}
	echo 
	cat name |sed 's/^/	/'
	echo 
	htmlfmt -l 132 description | sed 's/^/	/'

}



if(~ $#* 0)
	listall 
if not
	for(n in $*)
		detail $n



