remove: auto start date configuration (#1799)

This commit is contained in:
Nikhil 2023-08-11 12:43:43 +05:30 committed by GitHub
parent 8373f20944
commit 2769a73898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,11 +108,7 @@ class Issue(ProjectBaseModel):
~models.Q(name="Triage"), project=self.project ~models.Q(name="Triage"), project=self.project
).first() ).first()
self.state = random_state self.state = random_state
if random_state.group == "started":
self.start_date = timezone.now().date()
else: else:
if default_state.group == "started":
self.start_date = timezone.now().date()
self.state = default_state self.state = default_state
except ImportError: except ImportError:
pass pass
@ -127,8 +123,6 @@ class Issue(ProjectBaseModel):
PageBlock.objects.filter(issue_id=self.id).filter().update( PageBlock.objects.filter(issue_id=self.id).filter().update(
completed_at=timezone.now() completed_at=timezone.now()
) )
elif self.state.group == "started":
self.start_date = timezone.now().date()
else: else:
PageBlock.objects.filter(issue_id=self.id).filter().update( PageBlock.objects.filter(issue_id=self.id).filter().update(
completed_at=None completed_at=None
@ -153,9 +147,6 @@ class Issue(ProjectBaseModel):
if largest_sort_order is not None: if largest_sort_order is not None:
self.sort_order = largest_sort_order + 10000 self.sort_order = largest_sort_order + 10000
# If adding it to started state
if self.state.group == "started":
self.start_date = timezone.now().date()
# Strip the html tags using html parser # Strip the html tags using html parser
self.description_stripped = ( self.description_stripped = (
None None