dev: add max length field and group in default project states

This commit is contained in:
pablohashescobar 2022-12-13 23:22:34 +05:30
parent cb640407b6
commit a5f071311d
2 changed files with 31 additions and 4 deletions

View File

@ -90,10 +90,36 @@ class ProjectViewSet(BaseViewSet):
## Default states ## Default states
states = [ states = [
{"name": "Todo", "color": "#eb5757", "sequence": 25000}, {
{"name": "In Progress", "color": "#26b5ce", "sequence": 35000}, "name": "Backlog",
{"name": "Done", "color": "#f2c94c", "sequence": 45000}, "color": "#5e6ad2",
{"name": "Cancelled", "color": "#4cb782", "sequence": 55000}, "sequence": 15000,
"group": "backlog",
},
{
"name": "Todo",
"color": "#eb5757",
"sequence": 25000,
"group": "unstarted",
},
{
"name": "In Progress",
"color": "#26b5ce",
"sequence": 35000,
"group": "started",
},
{
"name": "Done",
"color": "#f2c94c",
"sequence": 45000,
"group": "completed",
},
{
"name": "Cancelled",
"color": "#4cb782",
"sequence": 55000,
"group": "cancelled",
},
] ]
State.objects.bulk_create( State.objects.bulk_create(

View File

@ -21,6 +21,7 @@ class State(ProjectBaseModel):
("cancelled", "Cancelled"), ("cancelled", "Cancelled"),
), ),
default="backlog", default="backlog",
max_length=20,
) )
def __str__(self): def __str__(self):