# Discourse Yearly Review

**URL:** <https://meta.discourse.org/t/discourse-yearly-review/105713>\
**Category:** Plugin\
**Tags:** official, yearly-review\
**Created:** [January 4, 2019, 9:23pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713 "2019-01-04T21:23:16Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [January 4, 2024, 12:41am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/161 "2024-01-04T00:41:24Z")

</div>

> [@tobiaseigen](#):
>
> > [@Jagster](#):
> >
> > And that’s why a tip to publish the review first at more private category, i.e. Staff, and then move to public, is actually not-so-good advice 😉 Unless an admin wants to keep two versions.
> 
> Whoa, I was not aware that this is what happens. I just tested it and you are right! This is a bug. It should not create a second yearly review topic if one exists already.
> 
> Replication steps:
> 
> 1. once yearly review topic is created, move it to a different category
> 2. trigger creation of yearly review topic via `/sidekiq`
> 3. second yearly review topic is created.

I’m not able to reproduce this. I assume by “trigger creation in sidekiq” you are clicking this button?

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/7/a/97ab2504701aa1421c9cf56bb10bffa5f56f6a9c.jpeg)

The logic to check if the topic already exists is just based on a custom field per [FIX: Check for existing review topic by custom field (#65) · discourse/discourse-yearly-review@98012d8 · GitHub](https://github.com/discourse/discourse-yearly-review/commit/98012d8c923c9c9ad0028e3c8c44fffc13556ea6) fix, so changing the category shouldn’t make a difference (though of course deleting the topic will):

```ruby
def review_topic_exists?(review_year)
  TopicCustomField
    .find_by(name: ::YearlyReview::POST_CUSTOM_FIELD, value: review_year.to_s)
    &.topic
    .present?
end

```

Unless there is something clearing these custom fields or some other issue I am not aware of?

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [January 4, 2024, 2:11pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/162 "2024-01-04T14:11:42Z")

</div>

And yet is happening. Mine is creating new one, and

- the plugin used category `forum` at the Jan 1st
- I changed setting to category `community`
- I moved created review from `forum` to `community` editing topic itself, not using timer and republishing
- the plugin created new one next day (I’ve allowed duplicate headers)

Or

- the plugin is configured to use category `staff`
- I moved created topic from `staff` to `community` editing topic itself
- next day the plugin created new one to `staff`

The last one may been an issue because of

- I moved created review without staff members and moved the review to `community`
- I included staff and triggered creation and it did new review and this time staff included as asked
- I edited name of that topic and moved to `community`
- I changed setting back to staff excluded
- and the plugin created new review next day

It should create a review, if

- date is after Jan 1., AND
- there is not a topic of right name

Well, AFAIK it should follow that logic. I can be very wrong too. But without any knowledge of coding what so ever I would make a bold claim: it doesn’t recoqnize name of topic now because category is different what settings say it should be.

---

<div class="post-metadata">

**Author:** ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Post date:** [January 4, 2024, 4:57pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/163 "2024-01-04T16:57:50Z")

</div>

> [@martin](#):
>
> I assume by “trigger creation in sidekiq” you are clicking this button?

Correct.

I am able to replicate this again today using the exact same steps, on my personal site. I now have three of these topics in three different categories.

Happy to invite you to show you.

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [January 5, 2024, 12:30am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/164 "2024-01-05T00:30:00Z")

</div>

> [@Jagster](#):
>
> It should create a review, if
> 
> - date is after Jan 1., AND
> - there is not a topic of right name

We recently changed this to check for the presence of a custom field on the yearly review topic for that year, the topic title _should_ have no bearing:

> <https://github.com/discourse/discourse-yearly-review/blob/64389301dc843fcbc9f839513deb51632698de3d/app/jobs/yearly_review.rb#L19-L23>

> <https://github.com/discourse/discourse-yearly-review/blob/64389301dc843fcbc9f839513deb51632698de3d/app/jobs/yearly_review.rb#L627-L632>

Just confirming, but do you and @tobiaseigen have the latest version with this commit [FIX: Check for existing review topic by custom field (#65) · discourse/discourse-yearly-review@98012d8 · GitHub](https://github.com/discourse/discourse-yearly-review/commit/98012d8c923c9c9ad0028e3c8c44fffc13556ea6) installed?

> [@Jagster](#):
>
> And yet is happening.

I am not saying it is not happening – there is clearly some difference in configuration or some other difference between my local setup and yours/Tobias’ sites, so just trying to narrow things down here so we can push a fix.

> [@tobiaseigen](#):
>
> Happy to invite you to show you.

@tobiaseigen yes please!

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [January 5, 2024, 8:12am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/165 "2024-01-05T08:12:07Z")

</div>

> [@martin](#):
>
> but do you and @tobiaseigen have the latest version with this commit

I don’t know, you tell me 😏

3.2.0.beta4-dev ([9ac3961f23](https://github.com/discourse/discourse/commits/9ac3961f23e8780f687b9211ba863dbbe95b9ad7))

Anyway, I’m not big believer on once a year upgrading, so I’ll do rebuilding today too.

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [January 8, 2024, 12:03am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/166 "2024-01-08T00:03:09Z")

</div>

I thought I updated this topic last week but I didn’t :facepalm: I found the issue, and the fix is here:

[https://github.com/discourse/discourse-yearly-review/pull/69](https://github.com/discourse/discourse-yearly-review/pull/69)

TL;DR: That previous commit I made introduced a bug, where if the first year topic for the year is deleted, subsequent sidekiq runs will keep making more and more topics. Once you have that commit the issue should stop.

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [December 26, 2024, 7:59pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/167 "2024-12-26T19:59:29Z")

</div>

One question because the virtual world has changed: Are AI personas excluded somehow? I mean, those chatty ones that can be mentioned.

Because if those non-humans show up in the review, I will be in big trouble.

My first attempt was to add AIs to the staff group, but that wasn’t possible.

---

<div class="post-metadata">

**Author:** ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Post date:** [December 26, 2024, 8:31pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/168 "2024-12-26T20:31:55Z")

</div>

Good question! Can you test it on your site and let us know?

Presumably since bots don’t participate in public discussions, they will not be featured.

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [December 26, 2024, 8:35pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/169 "2024-12-26T20:35:33Z")

</div>

Well, my bots participate, a lot. That’s why those are mentionable.

I could do a test drive triggering the review manually. Didn’t think that option at all 😂

**edit** : it didn’t do anything at all, no review what so ever 🤔

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [December 26, 2024, 9:06pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/170 "2024-12-26T21:06:44Z")

</div>

> <https://github.com/discourse/discourse-yearly-review/blob/439e0d78f1d8a0f387c0ec26f233a090ce82ef72/app/jobs/yearly_review.rb#L21-L21>

I think it only works in January.

I’ve only had a quick look on my phone but I’ve seen some checks that the UserID is greater than 0. The AI users created by the Discourse AI plugin have negative IDs.

---

<div class="post-metadata">

**Author:** ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Post date:** [December 26, 2024, 9:23pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/171 "2024-12-26T21:23:34Z")

</div>

> [@Moin](#):
>
> I think it only works in January.

That’s true unless you run it manually - see the instructions in the first post.

---

<div class="post-metadata">

**Author:** ![ked](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ked/32/64837_2.png) [@ked](https://meta.discourse.org/u/ked)\
**Post date:** [December 28, 2024, 1:42pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/172 "2024-12-28T13:42:17Z")

</div>

My understanding is that **only** the top 5 public categories will be used to pull data from, IF nothing is placed in that first setting option. May I assume that if I specify 20 or 30 (or more) categories there, that they will all be used for source data? I have a large number of categories, and 5 just doesn’t represent my user base very well.

Happy New Year

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [January 1, 2025, 10:04am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/173 "2025-01-01T10:04:54Z")

</div>

Yeah, it doesn’t include bots. Nice.

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [January 1, 2025, 10:10am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/174 "2025-01-01T10:10:36Z")

</div>

Happy New Year!

On my three sites the plugin did not run - at least no new topic was created. It’s 11am local time here. Do I need to run it manually? And doesn’t it run twice maybe?

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [January 1, 2025, 10:10am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/175 "2025-01-01T10:10:43Z")

</div>

I tried to create a shadow review including the staff. Just nice reminder to users how big part they are content wise. But it refuses generate it — I guess because it knows it has been alredy done.

Is the only solution delete original one, regenerate new and restore the the first one?

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [January 1, 2025, 10:11am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/176 "2025-01-01T10:11:49Z")

</div>

It follows the time you installed the plugin. So manually triggering will do the job, and next year it will follow that time.

---

<div class="post-metadata">

**Author:** ![Kartoon](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@Kartoon](https://meta.discourse.org/u/Kartoon)\
**Post date:** [January 1, 2025, 10:58am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/177 "2025-01-01T10:58:01Z")

</div>

You can definitely do it, last year I made one with both. I don’t remember how I did it but I definitely didn’t delete anything. I think I just clicked the option and the force ran it

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [January 1, 2025, 11:19am UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/178 "2025-01-01T11:19:41Z")

</div>

But it doesn’t do it now. I have a feeling it has something to do earlier bug’ish where the plugin created new review if the old one was moved to new category.

---

<div class="post-metadata">

**Author:** ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)\
**Post date:** [January 1, 2025, 12:57pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/179 "2025-01-01T12:57:52Z")

</div>

There is a small bug. Pipe symbol `|` should be removed from topic title before including in the Markdown table.

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [January 1, 2025, 2:31pm UTC](https://meta.discourse.org/t/discourse-yearly-review/105713/180 "2025-01-01T14:31:39Z")

</div>

I did and got my review topics for all three instances. Unfortunately all three in English, not German (the language of the instances).

Last year the review topics were created (automaticly or manually triggered, don’t know anymore) at 3:15am. So something is not working here as you said.

Maybe the language and also automatic triggering things can be looked in for next year?

[Previous page](https://meta.discourse.org/t/discourse-yearly-review/105713.md?page=1)

[Next page](https://meta.discourse.org/t/discourse-yearly-review/105713.md?page=3)
