mattermost/server/public/pluginapi
Guillermo Vayá d15b933888
[MM-64683] Implement property field counting functionality in Plugin API (#33438)
* Implement property field limit enforcement and counting functionality in Plugin API

- Added a limit of 20 property fields per group in the CreatePropertyField method.
- Introduced CountPropertyFields method to count active and all property fields, including deleted ones.
- Enhanced tests to validate the new property field limit and counting behavior.
- Updated related API and service methods to support the new functionality.

* Update server/channels/app/properties/property_field.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix vet

* fix lint error

* fix test

* fix tests

* fix test

* count properties + targets

* Update server/channels/app/plugin_api.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove test for limit

* fix more tests

* improve testing messages now that the limit is removed

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

* Apply suggestion from @calebroseland

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
2025-09-11 12:49:14 -07:00
..
cluster [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
experimental MM-64486: Remove telemetry (#33606) 2025-09-04 18:46:18 +00:00
i18n Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
bot.go Profile image from bytes (#26610) 2024-03-28 10:56:55 +00:00
bot_test.go Profile image from bytes (#26610) 2024-03-28 10:56:55 +00:00
channel.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
channel_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
client.go MM-63285: Add property field methods to plugin API (#31035) 2025-06-10 16:10:28 -07:00
cluster.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
cluster_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
configuration.go Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
email.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
emoji.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
emoji_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
error.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
example_client_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
file.go Adding SetFileSearchableContent plugin API endpoint (#24355) 2023-08-30 13:43:40 -07:00
file_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
frontend.go Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
group.go New pluginapi method for syncables (#30790) 2025-05-21 14:44:34 -04:00
kv.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
kv_memory.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
kv_memory_test.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
kv_test.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
license.go Renamed premium SKU to Enterprise Advanced (#30882) 2025-05-02 11:34:46 +05:30
license_test.go Renamed premium SKU to Enterprise Advanced (#30882) 2025-05-02 11:34:46 +05:30
log.go Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
logrus.go Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
logrus_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
oauth.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
plugin_test.go [MM-54014] Run tests in public/... (#24320) 2023-08-22 12:48:53 +02:00
plugins.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
post.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
post_test.go [MM-62427] Add message attachments validation (#30180) 2025-03-20 12:53:50 +01:00
property.go [MM-64683] Implement property field counting functionality in Plugin API (#33438) 2025-09-11 12:49:14 -07:00
property_test.go [MM-64683] Implement property field counting functionality in Plugin API (#33438) 2025-09-11 12:49:14 -07:00
session.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
slashcommand.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
store.go MM-63368: Remove MySQL (#33458) 2025-07-22 20:40:55 +05:30
store_test.go fix(pluginapi/store): init master db if no replica (#29674) 2025-01-02 13:51:22 +05:30
system.go [MM-54288] Support Packet V2 (#29403) 2025-01-13 20:23:09 +01:00
system_test.go [MM-54288] Support Packet V2 (#29403) 2025-01-13 20:23:09 +01:00
team.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
team_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00
user.go PluginAPI: add ability to retrieve users by ids (#26936) 2024-05-15 07:06:40 -07:00
user_test.go PluginAPI: add ability to retrieve users by ids (#26936) 2024-05-15 07:06:40 -07:00
utils.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
utils_test.go [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00