|
a/scripts/fix-tracker-fields.py |
|
b/scripts/fix-tracker-fields.py |
|
... |
|
... |
19 |
if p.parent_id: continue
|
19 |
if p.parent_id: continue
|
20 |
c.project = p
|
20 |
c.project = p
|
21 |
q = TM.Globals.query.find()
|
21 |
q = TM.Globals.query.find()
|
22 |
if not q.count(): continue
|
22 |
if not q.count(): continue
|
23 |
for g in q:
|
23 |
for g in q:
|
|
|
24 |
if g.open_status_names: continue
|
|
|
25 |
if g.status_names is None: old_names = ['open', 'closed']
|
24 |
old_names = g.status_names.split() or ['open', 'closed']
|
26 |
else: old_names = g.status_names.split() or ['open', 'closed']
|
25 |
if g.open_status_names is None:
|
27 |
if g.open_status_names is None:
|
26 |
g.open_status_names = ' '.join(
|
28 |
g.open_status_names = ' '.join(
|
27 |
name for name in old_names if name != 'closed')
|
29 |
name for name in old_names if name != 'closed')
|
28 |
if g.closed_status_names is None:
|
30 |
if g.closed_status_names is None:
|
29 |
g.closed_status_names = 'closed'
|
31 |
g.closed_status_names = 'closed'
|