mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
feat: group states into predefined state types
This commit is contained in:
parent
e36641cbf0
commit
cb640407b6
@ -90,12 +90,10 @@ class ProjectViewSet(BaseViewSet):
|
||||
|
||||
## Default states
|
||||
states = [
|
||||
{"name": "Backlog", "color": "#5e6ad2", "sequence": 15000},
|
||||
{"name": "ToDo", "color": "#eb5757", "sequence": 25000},
|
||||
{"name": "Started", "color": "#26b5ce", "sequence": 35000},
|
||||
{"name": "InProgress", "color": "#f2c94c", "sequence": 45000},
|
||||
{"name": "Done", "color": "#4cb782", "sequence": 55000},
|
||||
{"name": "Cancelled", "color": "#cc1d10", "sequence": 65000},
|
||||
{"name": "Todo", "color": "#eb5757", "sequence": 25000},
|
||||
{"name": "In Progress", "color": "#26b5ce", "sequence": 35000},
|
||||
{"name": "Done", "color": "#f2c94c", "sequence": 45000},
|
||||
{"name": "Cancelled", "color": "#4cb782", "sequence": 55000},
|
||||
]
|
||||
|
||||
State.objects.bulk_create(
|
||||
|
@ -12,6 +12,16 @@ class State(ProjectBaseModel):
|
||||
color = models.CharField(max_length=255, verbose_name="State Color")
|
||||
slug = models.SlugField(max_length=100, blank=True)
|
||||
sequence = models.FloatField(default=65535)
|
||||
group = models.CharField(
|
||||
choices=(
|
||||
("backlog", "Backlog"),
|
||||
("unstarted", "Unstarted"),
|
||||
("started", "Started"),
|
||||
("completed", "Completed"),
|
||||
("cancelled", "Cancelled"),
|
||||
),
|
||||
default="backlog",
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
"""Return name of the state"""
|
||||
|
Loading…
Reference in New Issue
Block a user