Skip to content

Commit

Permalink
feat(actions): increase slack_message_format max length from 600 to…
Browse files Browse the repository at this point in the history
… 1200 (#23632)

Co-authored-by: Michael Matloka <[email protected]>
  • Loading branch information
thmsobrmlr and Twixes authored Jul 11, 2024
1 parent 2f2a37e commit c94e4e4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions frontend/src/scenes/actions/ActionEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps):
onChange={onChange}
disabled={!slackEnabled || !action.post_to_slack}
data-attr="edit-slack-message-format"
maxLength={
1200 /** Must be same as in posthog/models/action/action.py */
}
/>
<small>
<Link
Expand Down
2 changes: 1 addition & 1 deletion latest_migrations.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name
ee: 0016_rolemembership_organization_member
otp_static: 0002_throttling
otp_totp: 0002_auto_20190420_0723
posthog: 0434_add_web_vitals_opt_in
posthog: 0435_alter_action_slack_message_format
sessions: 0001_initial
social_django: 0010_uid_db_index
two_factor: 0007_auto_20201201_1019
17 changes: 17 additions & 0 deletions posthog/migrations/0435_alter_action_slack_message_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.11 on 2024-07-11 10:16

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("posthog", "0434_add_web_vitals_opt_in"),
]

operations = [
migrations.AlterField(
model_name="action",
name="slack_message_format",
field=models.CharField(blank=True, default="", max_length=1200),
),
]
2 changes: 1 addition & 1 deletion posthog/models/action/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Meta:
deleted: models.BooleanField = models.BooleanField(default=False)
events: models.ManyToManyField = models.ManyToManyField("Event", blank=True)
post_to_slack: models.BooleanField = models.BooleanField(default=False)
slack_message_format: models.CharField = models.CharField(default="", max_length=600, blank=True)
slack_message_format: models.CharField = models.CharField(default="", max_length=1200, blank=True)
updated_at: models.DateTimeField = models.DateTimeField(auto_now=True)
bytecode: models.JSONField = models.JSONField(null=True, blank=True)
bytecode_error: models.TextField = models.TextField(blank=True, null=True)
Expand Down

0 comments on commit c94e4e4

Please sign in to comment.