delegate action: set date, start to current, clear other fields
This commit is contained in:
parent
635a4e2568
commit
f12361daa4
1 changed files with 13 additions and 12 deletions
|
@ -609,7 +609,7 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
||||||
def onChangeAction(self):
|
def onChangeAction(self):
|
||||||
js = [self.actionJs['setDefault'],
|
js = [self.actionJs['setDefault'],
|
||||||
self.actionJs['showIf'],
|
self.actionJs['showIf'],
|
||||||
self.actionJs['setIfStart']]
|
self.actionJs['setIfSD']]
|
||||||
if self.state in ('done',):
|
if self.state in ('done',):
|
||||||
js.append(self.actionJs['setIfWF'])
|
js.append(self.actionJs['setIfWF'])
|
||||||
return ';\n'.join(js)
|
return ';\n'.join(js)
|
||||||
|
@ -618,19 +618,20 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
||||||
showIf="""
|
showIf="""
|
||||||
showIfIn(this, [['move', 'target_task'],
|
showIfIn(this, [['move', 'target_task'],
|
||||||
['delegate', 'target_party']])""",
|
['delegate', 'target_party']])""",
|
||||||
setIfStart="""
|
setIfSD="""
|
||||||
setIf(this, 'start', [['start_date', defValue],
|
setIfN(this, ['start', 'delegate'], [
|
||||||
['start_time', defValue],
|
['start_date', defValue],
|
||||||
['end_time', null],
|
['start_time', defValue],
|
||||||
['duration', ''],
|
['end_time', null],
|
||||||
['effort', '']])""",
|
['duration', ''],
|
||||||
|
['effort', '']])""",
|
||||||
setIfWF="""
|
setIfWF="""
|
||||||
setIfN(this, ['work', 'finish'], [
|
setIfN(this, ['work', 'finish'], [
|
||||||
['start_date', defValue],
|
['start_date', defValue],
|
||||||
['start_time', null],
|
['start_time', null],
|
||||||
['end_time', null],
|
['end_time', null],
|
||||||
['duration', ''],
|
['duration', ''],
|
||||||
['effort', '']])""",
|
['effort', '']])""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue