firefighter-incident 0.0.3__py3-none-any.whl → 0.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- firefighter/_version.py +2 -2
- firefighter/incidents/forms/select_impact.py +1 -1
- firefighter/incidents/migrations/0009_update_sla.py +30 -0
- firefighter/raid/client.py +2 -2
- firefighter/slack/views/modals/opening/select_impact.py +3 -2
- {firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/METADATA +1 -1
- {firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/RECORD +10 -9
- {firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/WHEEL +0 -0
- {firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/entry_points.txt +0 -0
- {firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/licenses/LICENSE +0 -0
firefighter/_version.py
CHANGED
|
@@ -63,7 +63,7 @@ class SelectImpactForm(forms.Form):
|
|
|
63
63
|
|
|
64
64
|
@property
|
|
65
65
|
def business_impact_new(self) -> str | None:
|
|
66
|
-
"""Get business impact. Will return N/A, Low, Medium or
|
|
66
|
+
"""Get business impact. Will return N/A, Lowest, Low, Medium, High or Highest."""
|
|
67
67
|
impact_value = ""
|
|
68
68
|
if self.is_valid():
|
|
69
69
|
impact: dict[str, ImpactLevel] = self.cleaned_data
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from django.db import migrations
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def update_priority_settings(apps, schema_editor):
|
|
5
|
+
Priority = apps.get_model("incidents", "Priority")
|
|
6
|
+
priorities_to_update = {
|
|
7
|
+
"P1": ("02:00:00", True, True),
|
|
8
|
+
"P2": ("04:00:00", True, True),
|
|
9
|
+
"P3": ("1 day, 00:00:00", True, True),
|
|
10
|
+
"P4": ("5 days, 00:00:00", True, True),
|
|
11
|
+
"P5": ("10 days, 00:00:00", True, True),
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
for name, (sla, enabled_create, enabled_update) in priorities_to_update.items():
|
|
15
|
+
Priority.objects.filter(name=name).update(
|
|
16
|
+
sla=sla,
|
|
17
|
+
enabled_create=enabled_create,
|
|
18
|
+
enabled_update=enabled_update,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Migration(migrations.Migration):
|
|
23
|
+
|
|
24
|
+
dependencies = [
|
|
25
|
+
("incidents", "0008_impact_level"),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
operations = [
|
|
29
|
+
migrations.RunPython(update_priority_settings),
|
|
30
|
+
]
|
firefighter/raid/client.py
CHANGED
|
@@ -88,8 +88,8 @@ class RaidJiraClient(JiraClient):
|
|
|
88
88
|
f"Suggested team to be routed: *{suggested_team_routing}*"
|
|
89
89
|
)
|
|
90
90
|
if business_impact and business_impact != "N/A":
|
|
91
|
-
if business_impact not in {"Low", "Medium", "High"}:
|
|
92
|
-
raise ValueError("Business impact must be Low, Medium or
|
|
91
|
+
if business_impact not in {"Lowest", "Low", "Medium", "High", "Highest"}:
|
|
92
|
+
raise ValueError("Business impact must be Lowest, Low, Medium, High or Highest")
|
|
93
93
|
extra_args["customfield_10936"] = {"value": business_impact}
|
|
94
94
|
if platform:
|
|
95
95
|
platform = platform.replace("platform-", "")
|
|
@@ -100,10 +100,11 @@ class SelectImpactModal(
|
|
|
100
100
|
else:
|
|
101
101
|
err_msg = f"Invalid priority data: {priority_data}" # type: ignore[unreachable]
|
|
102
102
|
raise TypeError(err_msg)
|
|
103
|
+
process = ":slack: Slack :jira_new: Jira ticket" if open_incident_context.get("response_type") == "critical" else ":jira_new: Jira ticket"
|
|
103
104
|
blocks.extend((
|
|
104
105
|
DividerBlock(),
|
|
105
106
|
SectionBlock(
|
|
106
|
-
text=f"💡
|
|
107
|
+
text=f"💡 Selected priority: {priority} - {priority.description}\n⏱️ SLA: {priority.sla}\n{process}"
|
|
107
108
|
),
|
|
108
109
|
))
|
|
109
110
|
|
|
@@ -173,7 +174,7 @@ class SelectImpactModal(
|
|
|
173
174
|
def _calculate_proposed_incident_type(
|
|
174
175
|
suggested_priority_value: int,
|
|
175
176
|
) -> ResponseType:
|
|
176
|
-
return "critical" if suggested_priority_value <=
|
|
177
|
+
return "critical" if suggested_priority_value <= 3 else "normal"
|
|
177
178
|
|
|
178
179
|
@staticmethod
|
|
179
180
|
def _update_private_metadata(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: firefighter-incident
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Incident Management tool made for Slack using Django
|
|
5
5
|
Project-URL: Repository, https://github.com/ManoManoTech/firefighter-incident
|
|
6
6
|
Project-URL: Documentation, https://manomanotech.github.io/firefighter-incident/latest/
|
|
@@ -6,7 +6,7 @@ gunicorn.conf.py,sha256=vHsTGjaKOr8FDMp6fTKYTX4AtokmPgYvvt5Mr0Q6APc,273
|
|
|
6
6
|
main.py,sha256=CsbprHoOYhjCLpTJmq9Z_aRYFoFgWxoz2pDLuwm8Eqg,1558
|
|
7
7
|
manage.py,sha256=5ivHGD13C6nJ8QvltKsJ9T9akA5he8da70HLWaEP3k8,689
|
|
8
8
|
firefighter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
firefighter/_version.py,sha256=
|
|
9
|
+
firefighter/_version.py,sha256=EY1c6JeG6uVHQoQcoxYAagjmJgQQxJk7iQ23gAoevU4,511
|
|
10
10
|
firefighter/api/__init__.py,sha256=JQW0Bv6xwGqy7ioxx3h6UGMzkkJ4DntDpbvV1Ncgi8k,136
|
|
11
11
|
firefighter/api/admin.py,sha256=x9Ysy-GiYjb0rynmFdS9g56e6n24fkN0ouGy5QD9Yrc,4629
|
|
12
12
|
firefighter/api/apps.py,sha256=P5uU1_gMrDfzurdMbfqw1Bnb2uNKKcMq17WBPg2sLhc,204
|
|
@@ -140,7 +140,7 @@ firefighter/incidents/forms/__init__.py,sha256=OU0r5eZc2A0UJNsL83n8AI5EvwUvg4Yx0
|
|
|
140
140
|
firefighter/incidents/forms/close_incident.py,sha256=wn7NsQBe2SnHoVZG3mwhZfdo-z3cEFMhbHo9ZEAtBBw,935
|
|
141
141
|
firefighter/incidents/forms/create_incident.py,sha256=uTjzEU8Qb7CQZUyNeKGovI0N5xIbrtxzUeF7tfId9es,2734
|
|
142
142
|
firefighter/incidents/forms/edit.py,sha256=2rQkiKak-vac-K3cIsqlGv4R5nhI7JLxw3DhFMXbWms,956
|
|
143
|
-
firefighter/incidents/forms/select_impact.py,sha256=
|
|
143
|
+
firefighter/incidents/forms/select_impact.py,sha256=twgvfvyT6TL4yzv1dx7H6IWrncfGTeMf2Qg6x0hTWjw,4637
|
|
144
144
|
firefighter/incidents/forms/update_key_events.py,sha256=1Xmnxe5OgZqLFS2HmMzQm3VGFPQipsdrLgKSwdh-fKc,4441
|
|
145
145
|
firefighter/incidents/forms/update_roles.py,sha256=Q26UPfwAj-8N23RNZLQkvmHGnS1_j_X5KQWjJmPjMKY,3635
|
|
146
146
|
firefighter/incidents/forms/update_status.py,sha256=1eJPRySAArirzOa4LFWlLgS0nLJPOZ6O7HoEpH2cARA,1029
|
|
@@ -153,6 +153,7 @@ firefighter/incidents/migrations/0005_enable_from_p1_to_p5_priority.py,sha256=sB
|
|
|
153
153
|
firefighter/incidents/migrations/0006_update_group_names.py,sha256=RHWre_VrnBmloFaqfoKA3TQtF8J2k5w1vzTEfGW81SQ,3172
|
|
154
154
|
firefighter/incidents/migrations/0007_update_component_name.py,sha256=Al9k5Xx2_ea4u20MIp2blTErdv7jkGDYCLhGJ3P-gdw,6555
|
|
155
155
|
firefighter/incidents/migrations/0008_impact_level.py,sha256=ZPDTYbt3q0gSEjMC7Nhl7LND9g4J4Hu5n_BO44sKFuc,8852
|
|
156
|
+
firefighter/incidents/migrations/0009_update_sla.py,sha256=cLbDmOKrcQOa6lb1kMd-xPJC1w7iDJuEsDTKymEnUMw,849
|
|
156
157
|
firefighter/incidents/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
157
158
|
firefighter/incidents/models/__init__.py,sha256=dCNP-zRYNNDOZB3JDDWp7vCl084Jh6RgDT_iP57RkOY,862
|
|
158
159
|
firefighter/incidents/models/component.py,sha256=7GyXKNFk1MZns6RUGLpkNw5u6He7H9N1LexzXbG4sBM,7445
|
|
@@ -288,7 +289,7 @@ firefighter/pagerduty/views/oncall_trigger.py,sha256=LYHpWyEaR6O8NazmsTl5ydtw1XH
|
|
|
288
289
|
firefighter/raid/__init__.py,sha256=nMNmvHCSkyLQsdhTow7myMU62vXk1e755gUntVfFFlY,154
|
|
289
290
|
firefighter/raid/admin.py,sha256=YaqjJ7UcoEf_72kKVVN-O2Pp7_9lGuUdc-nHSQZYEYM,1405
|
|
290
291
|
firefighter/raid/apps.py,sha256=BUkaZSu45Ghdpx1XnE3DaFD4SC2SeUtSDZOTYynte5k,1655
|
|
291
|
-
firefighter/raid/client.py,sha256=
|
|
292
|
+
firefighter/raid/client.py,sha256=JCeuKO2j1EYRHEKWn89fl9vF7KjW5XQVsu9MYrVOi48,7993
|
|
292
293
|
firefighter/raid/forms.py,sha256=oJOPHYFtwlffuPgFi4lbbOCoKhwianrvafNicOmT_-c,15816
|
|
293
294
|
firefighter/raid/messages.py,sha256=e75kwi0hCe5ChwU4t-_6Q3Rcy22MLLdVSsYyjvG2SCM,5542
|
|
294
295
|
firefighter/raid/models.py,sha256=FNfPHvlF9h09LxL2a4zFPfc0raArmufywjzTdqGATms,2662
|
|
@@ -391,7 +392,7 @@ firefighter/slack/views/modals/base_modal/mixins.py,sha256=c7WYs0aXKXVktEMNSZ8IU
|
|
|
391
392
|
firefighter/slack/views/modals/base_modal/modal_utils.py,sha256=1uHTlLxxeXUQttH3bHaehJwCuI6a-h04s-GzdnVA4sI,2459
|
|
392
393
|
firefighter/slack/views/modals/opening/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
393
394
|
firefighter/slack/views/modals/opening/check_current_incidents.py,sha256=28GN0SXP7rVPa55arX1aI98k45w9568GCRDA73eCHEM,2535
|
|
394
|
-
firefighter/slack/views/modals/opening/select_impact.py,sha256=
|
|
395
|
+
firefighter/slack/views/modals/opening/select_impact.py,sha256=P38gsWJ2UmHG9qunsrO9cl1qwZdGU572SYiafh8QLUU,8168
|
|
395
396
|
firefighter/slack/views/modals/opening/set_details.py,sha256=i6zQM2FYz3Z6s5AZH7lXgB2e8yjS0rDwgfMBZaiOqIw,5791
|
|
396
397
|
firefighter/slack/views/modals/opening/types.py,sha256=ETpp0DAz5OMI5h7iv62Of7yJCbI-Q4-3kKSS6msPQeY,563
|
|
397
398
|
firefighter/slack/views/modals/opening/details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -437,8 +438,8 @@ firefighter_tests/test_slack/views/modals/test_open.py,sha256=Iatphd7vnrEMrv8ysK
|
|
|
437
438
|
firefighter_tests/test_slack/views/modals/test_send_sos.py,sha256=_rE6jD-gOzcGyhlY0R9GzlGtPx65oOOguJYdENgxtLc,1289
|
|
438
439
|
firefighter_tests/test_slack/views/modals/test_status.py,sha256=oQzPfwdg2tkbo9nfkO1GfS3WydxqSC6vy1AZjZDKT30,2226
|
|
439
440
|
firefighter_tests/test_slack/views/modals/test_update_status.py,sha256=7wphJod5boKL6_rspZOfsURW2pbQ-2VYIoD-jBCzd84,39370
|
|
440
|
-
firefighter_incident-0.0.
|
|
441
|
-
firefighter_incident-0.0.
|
|
442
|
-
firefighter_incident-0.0.
|
|
443
|
-
firefighter_incident-0.0.
|
|
444
|
-
firefighter_incident-0.0.
|
|
441
|
+
firefighter_incident-0.0.4.dist-info/METADATA,sha256=l_OYHGRoHOxXFJbjcgN6kc1PjV8rJdyKPdQN1y-vZj0,5487
|
|
442
|
+
firefighter_incident-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
443
|
+
firefighter_incident-0.0.4.dist-info/entry_points.txt,sha256=c13meJbv7YNmYz7MipMOQwzQ5IeFOPXUBYAJ44XMQsM,61
|
|
444
|
+
firefighter_incident-0.0.4.dist-info/licenses/LICENSE,sha256=krRiGp-a9-1nH1bWpBEdxyTKLhjLmn6DMVVoIb0zF90,1087
|
|
445
|
+
firefighter_incident-0.0.4.dist-info/RECORD,,
|
|
File without changes
|
{firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{firefighter_incident-0.0.3.dist-info → firefighter_incident-0.0.4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|