#!/bin/rc

if(! test -e /n/axosoft/local)
	axofs

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

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

fn detail {
	cd $1
	ls > /dev/null
	echo `{basename $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 $all
if not
	for(n in $*)
		detail $all/$n



