-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress veryifying document or task WIP #138
- Loading branch information
1 parent
28ca851
commit 50517f1
Showing
7 changed files
with
91 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 2.2.5 on 2019-11-05 10:04 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('moonsheep', '0003_auto_20190821_1501'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='task', | ||
name='own_progress', | ||
field=models.DecimalField(decimal_places=3, default=0, max_digits=6, validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(0)]), | ||
), | ||
migrations.AddField( | ||
model_name='task', | ||
name='total_progress', | ||
field=models.DecimalField(decimal_places=3, default=0, max_digits=6, validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(0)]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from moonsheep import models | ||
|
||
|
||
def update_parents_progress(task: models.Task): | ||
if task.parent_id: | ||
pass | ||
# TODO update parent total progress #138 | ||
# ( average(subtasks progress) * average_number_of_subtasks(configured in task) + own_progress ) / (average_number_of_subtasks(configured in task) + 1) | ||
# own_progress of parent == 1 | ||
else: | ||
# it must be a doc-descendant task | ||
# TODO update doc progress #138 | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters