Commit Graph

33 Commits

Author SHA1 Message Date
Klaas van Schelven 28b2ce0eaf Various models: .project SET_NULL => DO_NOTHING
Like e45c61d6f0, but for .project.

I originally thought `SET_NULL` would be a good way to "do stuff later", but
that's only so the degree that [1] updates are cheaper than deletes and [2]
2nd-order effects (further deletes in the dep-tree) are avoided.

Now that we have explicit Project-deletion (deps-first, delayed, properly batched)
the SET_NULL behavior is always a no-op (but with cost in queries).

As a result, in the test for project deletion (which has deletes for many
of the altered models), the following 12 queries are no longer done:

```
SELECT "projects_project"."id", [..many fields..] FROM "projects_project" WHERE "projects_project"."id" = 1
DELETE FROM "projects_projectmembership" WHERE "projects_projectmembership"."project_id" IN (1)
DELETE FROM "alerts_messagingserviceconfig" WHERE "alerts_messagingserviceconfig"."project_id" IN (1)
UPDATE "releases_release" SET "project_id" = NULL WHERE "releases_release"."project_id" IN (1)
UPDATE "issues_issue" SET "project_id" = NULL WHERE "issues_issue"."project_id" IN (1)
UPDATE "issues_grouping" SET "project_id" = NULL WHERE "issues_grouping"."project_id" IN (1)
UPDATE "events_event" SET "project_id" = NULL WHERE "events_event"."project_id" IN (1)
UPDATE "tags_tagkey" SET "project_id" = NULL WHERE "tags_tagkey"."project_id" IN (1)
UPDATE "tags_tagvalue" SET "project_id" = NULL WHERE "tags_tagvalue"."project_id" IN (1)
UPDATE "tags_eventtag" SET "project_id" = NULL WHERE "tags_eventtag"."project_id" IN (1)
UPDATE "tags_issuetag" SET "project_id" = NULL WHERE "tags_issuetag"."project_id" IN (1)
```
2025-07-03 21:49:49 +02:00
Klaas van Schelven f84af74a7c Remove hard-coded webhook_url from test_message
as pointed out by Slack's own bots
2025-06-11 08:42:06 +02:00
Klaas van Schelven fac5b19966 Slack Alerts
Fix #3
2025-06-10 22:00:37 +02:00
Klaas van Schelven fd7eae681d Remove migrations directory from modelless apps 2025-02-03 13:05:20 +01:00
Klaas van Schelven eafdcfdf32 Alert: truncate the individual parts
this way, for a long issue.title, you still see what the project context is
2024-09-26 15:06:24 +02:00
Klaas van Schelven 98caf0ec55 Notifications: link to /accounts/preferences/ 2024-09-13 09:41:44 +02:00
Klaas van Schelven 129a8db421 Fix various flake8 errors 2024-08-21 09:31:05 +02:00
Klaas van Schelven 95cb39f5af Implement 'send_email_alerts'
* cascading from team to project; user is base-level-default
* implemented at form-level
* implemented when emails are actually sent
2024-06-13 13:23:14 +02:00
Klaas van Schelven c4358aaece Fix tests for users.User idiom 2024-06-12 17:45:06 +02:00
Klaas van Schelven 42ba4cc99c Put mail templates in a so-named directory 2024-06-06 09:38:43 +02:00
Klaas van Schelven 8692378009 Move utils to more general place 2024-05-31 09:38:39 +02:00
Klaas van Schelven f2de61b273 Use app_settings for Bugsink-specific stuff
something about consistency
2024-05-13 15:09:35 +02:00
Klaas van Schelven 3c106521bc snappea WIP commit 2024-04-19 16:21:42 +02:00
Klaas van Schelven 8e44f7f68e Unmute reason: show in email alert 2024-04-15 10:17:18 +02:00
Klaas van Schelven 2c4e8b9f20 Regular v.s. Django Testcase: be explicit
I recently ran into a funny issue where the TestCases were influencing my
development DB's contents
2024-04-15 09:17:53 +02:00
Klaas van Schelven 0d4c51958f Reordering of the order of elements in subject/first-line
most important change: 'New issue' from start of the subject to its end.
This was prompted by getting flooded with 'New issue' emails, but you
want to know _what_ first.
2024-03-20 21:02:35 +01:00
Klaas van Schelven 331ac49069 Email hidden-div-preview: put some useful info there 2024-03-16 13:01:23 +01:00
Klaas van Schelven 3f8200f940 Textual 'copyable link'
I was confused myself by the previous text
2024-03-15 20:09:05 +01:00
Klaas van Schelven 86e057db5b Add quotes to email subject for legibility 2024-03-15 20:09:15 +01:00
Klaas van Schelven 910b04687b Fix 'view on' link in emails 2024-03-09 21:50:13 +01:00
Klaas van Schelven 9ac74ffe17 rename -> site_title
A foolish consistency is the hobgoblin of little minds
2024-01-16 23:07:10 +01:00
Klaas van Schelven 2eacf93ebc missing file 2024-01-16 22:59:14 +01:00
Klaas van Schelven 1426c2f572 Sending of emails: tests, .txt versions, further small improvements 2024-01-16 18:01:45 +01:00
Klaas van Schelven 8cb918d211 html comments => django template comments 2024-01-16 17:12:56 +01:00
Klaas van Schelven ec65b52b26 Email layout: margins; cyan 2024-01-15 23:25:58 +01:00
Klaas van Schelven 38312a25e8 First steps towards email-layout (and the right info) 2024-01-15 23:20:35 +01:00
Klaas van Schelven 74188297dc Infrastructure for email-html debugging 2024-01-15 22:59:28 +01:00
Klaas van Schelven 24cbda71dc Don't send images with emails
The cost/benefit says "this is simply not worth it".
It's yet another thing that could break. In ways that are not obvious to me.
(html) email sending is hard enough as it stands.
2024-01-14 22:29:47 +01:00
Klaas van Schelven 97d2e0b09d WIP: email-sending for new_issue 2024-01-14 22:25:36 +01:00
Klaas van Schelven ae8faa1bcf alerts: new_issue.html from PostMark welcome email (verbatim copy)
https://raw.githubusercontent.com/ActiveCampaign/postmark-templates/main/templates-inlined/basic/password-reset/content.html
2024-01-14 22:23:31 +01:00
Klaas van Schelven 8766e2ccfe new-issue and regression alerts (not actually implemented, but the call is) 2024-01-10 17:14:49 +01:00
Klaas van Schelven 17b6758e6b unmute alerts (not actually implemented, but the call is) 2024-01-10 08:43:06 +01:00
Klaas van Schelven f96724a4db celery: basic config (quickstart); alerts startapp
I've checked that this celery config actually works (also with TASK_ALWAYS_EAGER=False)
2024-01-09 19:16:07 +01:00