Retrospring / retrospring

Q/A based social network
https://retrospring.net
GNU Affero General Public License v3.0
213 stars 28 forks source link

Change `deleted` field in Reports to `resolved` #1638

Open pixeldesu opened 4 months ago

pixeldesu commented 4 months ago

We don't even have soft deletes (yet), so having a field like this technically doesn't make sense. What is more appropriate in the context of Reports is a resolved field.

ankiiisharma commented 4 months ago

hey @pixeldesu , can you please elaborate this more ? i would love to work on this. thanks

pixeldesu commented 4 months ago

@ankiiisharma Reports have a deleted database field (as you can find here: https://github.com/Retrospring/retrospring/blob/main/db/schema.rb#L174).

Because the field isn't really for a report being deleted but rather being resolved, the field should be renamed to resolved with a migration, and of course, all usages of the deleted field in Ruby code should be adjusted to resolved then as well.