aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack/organisations')
-rw-r--r--ctrack/organisations/migrations/0008_auto_20200529_1545.py38
-rw-r--r--ctrack/organisations/models.py40
2 files changed, 57 insertions, 21 deletions
diff --git a/ctrack/organisations/migrations/0008_auto_20200529_1545.py b/ctrack/organisations/migrations/0008_auto_20200529_1545.py
new file mode 100644
index 0000000..1c4cec6
--- /dev/null
+++ b/ctrack/organisations/migrations/0008_auto_20200529_1545.py
@@ -0,0 +1,38 @@
+# Generated by Django 2.2.12 on 2020-05-29 15:45
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organisations', '0007_auto_20200529_1520'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='incidentreport',
+ name='date_time_incident_detected',
+ field=models.DateTimeField(verbose_name='Date/Time incident detected'),
+ ),
+ migrations.AlterField(
+ model_name='incidentreport',
+ name='dft_handle_status',
+ field=models.CharField(choices=[('QUEUED', 'QUEUED'), ('REVIEWING', 'REVIEWING'), ('WAITING', 'WAITING'), ('COMPLETED', 'COMPLETED')], default='QUEUED', max_length=20),
+ ),
+ migrations.AlterField(
+ model_name='incidentreport',
+ name='incident_stage',
+ field=models.CharField(choices=[('Ongoing', 'Ongoing'), ('Ended', 'Ended'), ('Ongoing but managed', 'Ongoing but managed')], max_length=20),
+ ),
+ migrations.AlterField(
+ model_name='incidentreport',
+ name='incident_status',
+ field=models.CharField(choices=[('Detected', 'Detected'), ('Suspected', 'Suspected'), ('Resolved', 'Resolved')], max_length=20),
+ ),
+ migrations.AlterField(
+ model_name='incidentreport',
+ name='incident_type',
+ field=models.CharField(choices=[('Cyber', 'Cyber'), ('Non-Cyber', 'Non-Cyber'), ('Both', 'Both'), ('Power Outage', 'Power Outage')], help_text='This can be appoximate', max_length=20),
+ ),
+ ]
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py
index 270ebd6..8fbe296 100644
--- a/ctrack/organisations/models.py
+++ b/ctrack/organisations/models.py
@@ -185,26 +185,26 @@ class Stakeholder(models.Model):
class IncidentReport(models.Model):
DFT_HANDLE_STATUS = (
- ("queued", "QUEUED"),
- ("reviewing", "REVIEWING"),
- ("waiting", "WAITING"),
- ("completed", "COMPLETE"),
+ ("QUEUED", "QUEUED"),
+ ("REVIEWING", "REVIEWING"),
+ ("WAITING", "WAITING"),
+ ("COMPLETED", "COMPLETED"),
)
INCIDENT_TYPES = (
- ("cyber", "Cyber"),
- ("non-cyber", "Non-Cyber"),
- ("both", "Both"),
- ("power", "Power Outage"),
+ ("Cyber", "Cyber"),
+ ("Non-Cyber", "Non-Cyber"),
+ ("Both", "Both"),
+ ("Power Outage", "Power Outage"),
)
INCIDENT_STATUS = (
- ("detected", "Detected"),
- ("suspected", "Suspected"),
- ("resolved", "Resolved"),
+ ("Detected", "Detected"),
+ ("Suspected", "Suspected"),
+ ("Resolved", "Resolved"),
)
INCIDENT_STAGE = (
- ("ongoing", "Ongoing"),
- ("ended", "Ended"),
- ("managed", "Ongoing but managed"),
+ ("Ongoing", "Ongoing"),
+ ("Ended", "Ended"),
+ ("Ongoing but managed", "Ongoing but managed"),
)
organisation = models.ForeignKey(
Organisation, blank=False, on_delete=models.CASCADE
@@ -222,18 +222,16 @@ class IncidentReport(models.Model):
email = models.EmailField(blank=False)
internal_incident_number = models.CharField(max_length=30, blank=True)
date_time_incident_detected = models.DateTimeField(
- verbose_name="Date/Time incident detected",
- auto_now=False,
- help_text="This can be approximate",
+ verbose_name="Date/Time incident detected", auto_now=False,
)
date_time_incident_reported = models.DateTimeField(
verbose_name="Date/Time incident reported", auto_now=True
)
incident_type = models.CharField(
- choices=INCIDENT_TYPES, help_text="This can be appoximate", max_length=10
+ choices=INCIDENT_TYPES, help_text="This can be appoximate", max_length=20
)
- incident_status = models.CharField(choices=INCIDENT_STATUS, max_length=10)
- incident_stage = models.CharField(choices=INCIDENT_STAGE, max_length=10)
+ incident_status = models.CharField(choices=INCIDENT_STATUS, max_length=20)
+ incident_stage = models.CharField(choices=INCIDENT_STAGE, max_length=20)
summary = models.TextField(
help_text="Please provide a summary of your understanding of the incident, including"
" any impact to services and/or users."
@@ -252,7 +250,7 @@ class IncidentReport(models.Model):
verbose_name="Planned next steps", help_text="What are your planned next steps?"
)
dft_handle_status = models.CharField(
- choices=DFT_HANDLE_STATUS, max_length=20, default="queued"
+ choices=DFT_HANDLE_STATUS, max_length=20, default="QUEUED"
)
def __str__(self):