@@ -527,11 +527,11 @@ class Migration(migrations.Migration):
...
@@ -527,11 +527,11 @@ class Migration(migrations.Migration):
('tags',django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128),blank=True,default=list,help_text='User-defined search keywords for object.',size=8)),
('tags',django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128),blank=True,default=list,help_text='User-defined search keywords for object.',size=8)),
('created_at',models.DateTimeField(auto_now_add=True,help_text='Moment of object creation.')),
('created_at',models.DateTimeField(auto_now_add=True,help_text='Moment of object creation.')),
('updated_at',models.DateTimeField(auto_now=True,help_text='Moment of last object update.')),
('updated_at',models.DateTimeField(auto_now=True,help_text='Moment of last object update.')),
('user_identifier',models.CharField(editable=False,help_text='The ID of the user who changed the state of the subtask.',max_length=128)),
('user_identifier',models.CharField(editable=False,help_text='The ID of the user who changed the state of the subtask.',null=True,max_length=128)),
('new_state',models.ForeignKey(editable=False,help_text='Subtask state after update (see Subtask State Machine).',on_delete=django.db.models.deletion.PROTECT,related_name='is_new_state_of',to='tmssapp.SubtaskState')),
('new_state',models.ForeignKey(editable=False,help_text='Subtask state after update (see Subtask State Machine).',on_delete=django.db.models.deletion.PROTECT,related_name='is_new_state_of',to='tmssapp.SubtaskState')),
('old_state',models.ForeignKey(editable=False,help_text='Subtask state before update (see Subtask State Machine).',null=True,on_delete=django.db.models.deletion.PROTECT,related_name='is_old_state_of',to='tmssapp.SubtaskState')),
('old_state',models.ForeignKey(editable=False,help_text='Subtask state before update (see Subtask State Machine).',null=True,on_delete=django.db.models.deletion.PROTECT,related_name='is_old_state_of',to='tmssapp.SubtaskState')),
('subtask',models.ForeignKey(editable=False,help_text='Subtask to which this state change refers.',on_delete=django.db.models.deletion.CASCADE,to='tmssapp.Subtask')),
('subtask',models.ForeignKey(editable=False,help_text='Subtask to which this state change refers.',on_delete=django.db.models.deletion.CASCADE,to='tmssapp.Subtask')),
('user',models.ForeignKey(editable=False,help_text='The user who changed the state of the subtask.',on_delete=django.db.models.deletion.PROTECT,to=settings.AUTH_USER_MODEL)),
('user',models.ForeignKey(editable=False,help_text='The user who changed the state of the subtask.',null=True,on_delete=django.db.models.deletion.PROTECT,to=settings.AUTH_USER_MODEL)),
@@ -205,8 +205,8 @@ class SubtaskStateLog(BasicCommon):
...
@@ -205,8 +205,8 @@ class SubtaskStateLog(BasicCommon):
available to keep track of changes more generally: https://djangopackages.org/grids/g/model-audit/
available to keep track of changes more generally: https://djangopackages.org/grids/g/model-audit/
This seems a bit overkill at the moment and we have to manage access to those logs etc., this needs tbd.
This seems a bit overkill at the moment and we have to manage access to those logs etc., this needs tbd.
"""
"""
user=ForeignKey(User,null=False,editable=False,on_delete=PROTECT,help_text='The user who changed the state of the subtask.')
user=ForeignKey(User,null=True,editable=False,on_delete=PROTECT,help_text='The user who changed the state of the subtask.')
user_identifier=CharField(null=False,editable=False,max_length=128,help_text='The ID of the user who changed the state of the subtask.')
user_identifier=CharField(null=True,editable=False,max_length=128,help_text='The ID of the user who changed the state of the subtask.')
subtask=ForeignKey('Subtask',null=False,editable=False,on_delete=CASCADE,help_text='Subtask to which this state change refers.')
subtask=ForeignKey('Subtask',null=False,editable=False,on_delete=CASCADE,help_text='Subtask to which this state change refers.')
old_state=ForeignKey('SubtaskState',null=True,editable=False,on_delete=PROTECT,related_name='is_old_state_of',help_text='Subtask state before update (see Subtask State Machine).')
old_state=ForeignKey('SubtaskState',null=True,editable=False,on_delete=PROTECT,related_name='is_old_state_of',help_text='Subtask state before update (see Subtask State Machine).')
new_state=ForeignKey('SubtaskState',null=False,editable=False,on_delete=PROTECT,related_name='is_new_state_of',help_text='Subtask state after update (see Subtask State Machine).')
new_state=ForeignKey('SubtaskState',null=False,editable=False,on_delete=PROTECT,related_name='is_new_state_of',help_text='Subtask state after update (see Subtask State Machine).')