state = state.strip().lower()
if not state:
state = 'todo'
+ if state == 'completed':
+ state = 'done'
+ if state == 'inprogress':
+ state = 'todo'
if state not in valid_states:
print >> sys.stderr, 'ERROR: invalid state "%s" for work item "%s"' % (
state, desc)