Tom Hughes
ab4f96261f
Drop explicit lengths from bigint columns
2025-02-28 17:22:56 +00:00
Nenad Vujicic
33dd13457c
Improves behavior if note lacks opening comment
...
Adds checking if note lacks opening comment and if positive, returns nil for both note's author and description.
2025-02-20 23:54:49 +01:00
Nenad Vujicic
663459d1c1
Adds index to notes on description column
...
Adds text index to description column to table notes.
2025-02-12 18:22:50 +01:00
Nenad Vujicic
85bc737dee
Switches from comments to all_comments
...
Switches from using note's .comments to .all_comments. Fixes bug with notes of deleted users without comments, which are filtered out, but the code tries to access the first comment.
2025-02-06 10:58:52 +01:00
Nenad Vujicic
2d0b7b6b87
Adds optional use of note's author and description
...
Adds optional use of author and description from notes (in case data-migration is done) and author and description from first visible note comment (in case data-migration is not done). Also, adds author association to Note model.
2025-02-04 01:29:45 +01:00
Nenad Vujicic
687429482f
Removed author_{id, ip} methods from Note model
...
Removed author_id, author_ip methods from Note model because they are not used anymore. Also, removed associated unit tests.
2025-01-28 13:47:03 +01:00
Tom Hughes
0ab8d954ad
Merge remote-tracking branch 'upstream/pull/5499'
2025-01-16 18:38:36 +00:00
Nenad Vujicic
f3fc4cdb49
Added description and author_id methods to Note
...
Added description and author_id (author_ip already exists) methods to Note model. They still use first comment (but will be soon replaced to use records from Note model).
2025-01-14 14:27:02 +01:00
Nenad Vujicic
16bdcac6d7
Added description, user_id, user_ip columns to notes
...
Added migration for adding new columns (description, user_id, user_ip) to notes table. Also, migration adds foreign key connecting notes and users tables (using user_id column).
2025-01-13 10:52:38 +01:00
Anton Khorev
001fed4fd7
Create note subscription table and model
2024-10-28 02:35:25 +03:00
Harry Wood
e057e1c479
Define a DEFAULT_FRESHLY_CLOSED_LIMIT constant
...
Define DEFAULT_FRESHLY_CLOSED_LIMIT in the Note model to allow the 7 day limit to be referenced in the API controller and in the new `freshy_closed_until` logic. The default value is `7.days`. API users can still override this, but the website uses that default for the duration of the green "freshly closed" notes markers.
2022-09-14 23:59:41 +01:00
Harry Wood
d8e51614cb
Display how long until a note will disappear
...
Modify the message displayed at the bottom of the notes sidepanel. For already resolved notes we don't want to say "please resolve it". Fixes https://github.com/openstreetmap/openstreetmap-website/issues/3663
Instead explain that it will disappear from the map (so reporting is probably not necessary) and display how long to go until that happens. Tackling https://github.com/openstreetmap/openstreetmap-website/issues/3071
2022-09-14 23:59:25 +01:00
Andy Allan
45487e1ff8
Merge branch 'pull/3472'
2022-03-02 15:00:25 +00:00
Tom Hughes
b5f06e06c1
Fix rubocop Rails/TimeZone warnings
2022-03-01 22:55:10 +00:00
Tom Hughes
03fdc6d67f
Add inverse_of to relationships that can't detect it automatically
2022-02-23 19:23:51 +00:00
Tom Hughes
7e925c3c00
Look at all note comments to find the close event
...
Fixes #2612
2020-05-06 14:06:04 +01:00
Andy Allan
a41d500b9f
Create an ApplicationRecord for models to inherit from
...
This is the default for Rails 5+, and also paves the way for
multiple database support.
2019-11-27 11:50:48 +01:00
Tom Hughes
135ec35a91
Fix numericality validation to use correct integer only constraint
...
Fixes #2355
2019-08-22 12:14:06 +01:00
Andy Allan
4377e2bd55
Update annotations to correctly show bigint types
2019-05-29 11:52:20 +02:00
Tom Hughes
6027c42ee7
Hide note comments made by deleted users
...
Fixes #1970
2018-09-04 22:22:39 +01:00
Andy Allan
b2a8df0bd7
Add annotate gem and associated rake task. Annotate models.
2017-10-22 22:18:26 +01:00
Tom Hughes
5b33f3f8e3
Fix rubocop warnings
2017-06-02 00:08:30 +01:00
Tom Hughes
8fe1899596
Fix rubocop warnings
2016-01-19 09:51:24 +00:00
Tom Hughes
dbe165bbb3
Fix some rubocop rails style issues
2015-02-26 00:12:54 +00:00
Tom Hughes
ef7f3d800c
Fix most auto-correctable rubocop issues
2015-02-20 08:56:16 +00:00
Tom Hughes
eaefb3ea73
Improve consistency of selections in the browser controller
2013-09-30 08:45:19 +01:00
Tom Hughes
ca30b879f6
Eliminate deprecated scope and association arguments
2013-09-21 11:35:46 +01:00
Tom Hughes
f0feca800d
Replace attr_accessible with strong parameters
2013-09-21 11:35:46 +01:00
Tom Hughes
d74d4f8d19
Add a reopen API call for notes
2013-06-10 18:52:50 +01:00
Tom Hughes
e932418998
Remove the flatten_comment methd from the Note model
2013-04-26 19:35:20 +01:00
Tom Hughes
ae27f7adbe
Make the API reject changes to closed notes
2013-02-05 18:08:42 +00:00
Tom Hughes
c12fe5f6e8
Remove redundant return
2013-02-05 17:42:08 +00:00
Tom Hughes
ba5107ebb5
Remove the author_name field from notes
2012-12-03 14:50:54 +00:00
Tom Hughes
6f88f4d03f
Fix mass assignment issues
2012-03-09 00:34:16 +00:00
Tom Hughes
67017dbca4
User errors.add(:base) instead of the removed errors.add_to_base()
2012-03-09 00:32:57 +00:00
Tom Hughes
2e1d9f3348
Make setting of a default status for new notes work
2012-03-09 00:31:53 +00:00
Tom Hughes
d5295fb485
Return GeoJSON for notes when JSON format is requested
2011-09-18 18:54:39 +01:00
Tom Hughes
8382181635
Tidy up the note controller
...
Go through most of the note controller, tidying things up, fixing
a few bugs, and making sure we have tests for everything.
2011-05-22 17:02:48 +01:00
Tom Hughes
33c0f15990
Tidy up the note model a bit
2011-05-22 11:33:49 +01:00
Tom Hughes
e3b8b89330
Mass rename of "bugs" as "notes" for increased user friendliness
2011-05-21 17:22:31 +01:00