Page MenuHomePhabricator

Automatically send an email to Wikibase owners when a Wikibase stays empty for more than 1 month
Closed, ResolvedPublic

Description

We see a consistent share of 15-17% of Wikibases that remain empty upon creation. These could have been forgotten about, abandoned due to difficulties getting started or Wikibase Cloud just not being the right fit for the person. Regardless, these Wikibases eat away at our resources, so we want to make sure that people can get started with them and feel supported, or give them a chance to delete it.

AC:

  • When a Wikibase is still empty after 30 days since creation date, then send an email to the administrator
  • It should also trigger for Wikibases that have been empty for >30 days upon release of this feature, i.e. Wikibases that have sat empty since launch
  • Sender should clearly indicate no reply, the email body should specify how to follow up
  • Email content should contain 3 cases:
    • Trouble getting started? Link to helpful resources (documentation) or reach out (link to contact page, Telegram) (check with Val)
    • Not planning on using this Wikibase? Delete it in your dashboard (link to dashboard) also would you mind telling us why? Please write to [...]
    • Planning on using it later? Feel free to ignore this email

CONTENT:

Subject: Need some help with your Wikibase?

Body:
Dear Wikibase Cloud user,

Thanks for creating a Wikibase instance on Wikibase Cloud! That was at least 30 days ago. We couldn't help but notice that your Wikibase instance remains empty, so we're checking in to see if we can help.

If you're still planning to use Wikibase for your project but just haven't gotten around to doing so, no worries -- feel free to ignore this email.

Are you having trouble getting started? We have some resources that might help:

Getting started
Data modeling
Learn by example
Get your questions answered: check the FAQ, ask us or ask the community, either on Telegram or the mailing list.

Have you reconsidered using Wikibase for this project? We'd love it if you'd tell us why. (You can delete your empty Wikibase(s) from your dashboard.)

Thanks for using Wikibase Cloud!

Event Timeline

Evelien_WMDE renamed this task from Idea: Automatically send an email to Wikibase owners when a Wikibase stays empty for more than 1 month to Automatically send an email to Wikibase owners when a Wikibase stays empty for more than 1 month.Sep 7 2023, 7:41 AM

@Valerie_Wollinger_WMDE any chance you can collab with Dan to get some content for this email? :) You can drop it here in the comment

Dear Wikibase.cloud user,

Thanks for creating a Wikibase instance on Wikibase.cloud! That was at least 30 days ago. We couldn't help but notice that your Wikibase instance remains empty, so we're checking in to see if we can help.

If you're still planning to use Wikibase for your project but just haven't gotten around to doing so, no worries -- feel free to ignore this email.

Are you having trouble getting started? We have some resources that might help:

Have you reconsidered using Wikibase for this project? We'd love it if you'd tell us why. (You can delete your empty Wikibase(s) from your dashboard.)

Thanks for using Wikibase Cloud!

@danshick-wmde Hi Dan! I noticed one little thing about the email that there's no mentioning of which wiki is empty. One user can have up to 6 wikis running so it's best to mention it somewhere before the user decided to delete it.
And it's totally doable in the code. Do you think it's a viable option?

@danshick-wmde Hi Dan! I noticed one little thing about the email that there's no mentioning of which wiki is empty. One user can have up to 6 wikis running so it's best to mention it somewhere before the user decided to delete it.
And it's totally doable in the code. Do you think it's a viable option?

Well sure! If @Evelien_WMDE wants that, then I'd say add the Wikibase name like this: "We couldn't help but notice that your Wikibase instance $WIKIBASE_NAME remains empty..."

Sounds good, thanks for the suggestion @dang :)

https://github.com/wbstack/api/pull/656

For the one who will pick this up. There are still a few things I couldn't finish before I go:

  • Check the notification running in WikibaseNotificationSendRecordJob.
  • Fix the test for the Job, I couldn't get it done sorry.
dang removed dang as the assignee of this task.Oct 20 2023, 9:11 AM
dang moved this task from Doing to To do on the Wikibase Cloud (Kanban board Q4 2023) board.
dang subscribed.
dang removed dang as the assignee of this task.Oct 31 2023, 10:17 PM
dang moved this task from Doing to In Review on the Wikibase Cloud (Kanban board Q4 2023) board.

@Evelien_WMDE Just to check what you expect is the following story true:

Wiki is made 29 days ago and is still empty: nothing is sent
One day passes and the wiki is now 30 days old and empty. A Notification is sent on this day.
Another 30 days pass and the wiki is still empty. We don't send any more notifications because this wiki was already notified before.

@Tarrow Correct, you get a cookie
Only additional logic applies to Wikibases that have sat empty for months now. They don't have empty=30 but empty=>30. They are a one-off exception and just get notified upon release of this notification.

Tarrow moved this task from In Review to Doing on the Wikibase Cloud (Kanban board Q4 2023) board.
Tarrow added a subscriber: Fring.
Fring removed dang as the assignee of this task.Nov 13 2023, 8:56 AM
Fring moved this task from Doing to To do on the Wikibase Cloud (Kanban board Q4 2023) board.

relevant side info: currently there seem to be 157 wikis to which the current criteria fits (created at least 30 days ago and not once edited since) and thus which owners we expect to be emailed once this gets deployed.

query used for this info:

Wiki::join('wiki_lifecycle_events', 'wikis.id', '=', 'wiki_lifecycle_events.wiki_id')->where('first_edited', null)->where('wikis.created_at', '<=', '2023-10-15 12:57:44')->count()

I just tried to simulate running this SendEmptyWikiNotificationsJob locally for 200 wikis and it worked fine, but bear in mind that the real environment differs quite a bit from the local setup. Nonetheless I assume that sending ~160 mails like that at once will work.

Here's a screenshot of how the email a user receives looks like (this can be tested in staging with engineering assistance once its deployed):

image.png (797×722 px, 105 KB)

dena removed dena as the assignee of this task.Nov 15 2023, 4:31 PM

Job fails to run on staging so reverted:

[2023-11-17 11:39:00] staging.ERROR: Failure processing wiki então.carolinadoran.co for EmptyWikiNotification check: Trying to get property 'first_edited' of non-object                                                                   
[2023-11-17 11:39:00] staging.ERROR: Executing Job '' failed. {"exception":"[object] (Exception(code: 1): Executing Job '' failed. at /var/www/html/app/Providers/AppServiceProvider.php:32)                                               
[stacktrace]                                                                                                                                                                                                                               
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(404): App\\Providers\\AppServiceProvider->App\\Providers\\{closure}(Object(Illuminate\\Queue\\Events\\JobFailed))

issue appears to be that code fails to take into account the possibility that LifeCycle events may not yet be generated

PR with fix for the issue above: https://github.com/wbstack/api/pull/686
(wikis without lifecycle events won't get queried)

dena removed dena as the assignee of this task.Nov 20 2023, 1:38 PM
dena moved this task from Doing to In Review on the Wikibase Cloud (Kanban board Q4 2023) board.
Evelien_WMDE claimed this task.