PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.2.0
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.2.0
2.2.1 2.2.0 2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 All 44 releases
← All changes | app/Services/Helper.php +20 -0 2.0.15 → 2.2.0 View file →
@@ -198,8 +198,9 @@
198 198 {
199 199 $fieldMaps = [
200 200 'bg_color' => 'sanitize_text_field',
201 201 'color' => 'sanitize_text_field',
202 + 'color_preset' => 'sanitize_key',
202 203 'label' => 'sanitize_text_field',
203 204 'boardId' => 'intval',
204 205 'task_id' => 'intval',
205 206 'meta_value' => 'intval',
@@ -240,10 +241,23 @@
240 241
241 242 return $data;
242 243 }
243 244
245 + /** Store full custom-field messages in LONGTEXT while keeping legacy VARCHAR columns bounded. */
244 246 public static function createActivity($data)
245 247 {
248 + if (!empty($data['settings']['custom_field_id'])) {
249 + $payload = [];
250 + foreach (['column', 'old_value', 'new_value', 'description'] as $key) {
251 + $payload[$key] = $data[$key] ?? null;
252 + }
253 + $data['settings']['custom_field_activity_payload'] = true;
254 + $data['description'] = wp_json_encode($payload);
255 + $data['column'] = Constant::ACTIVITY_CUSTOM_FIELD;
256 + $data['old_value'] = null;
257 + $data['new_value'] = null;
258 + }
259 +
246 260 return Activity::create($data);
247 261 }
248 262
249 263 public static function sanitizeTaskMeta($data)
@@ -334,8 +348,9 @@
334 348 }
335 349 return fluent_boards_page_url() . 'boards/' . $boardId;
336 350 }
337 351
352 + /** Format a CRM contact, avoiding a database lookup for unassociated tasks. */
338 353 public static function crm_contact($id)
339 354 {
340 355 if (!defined('FLUENTCRM')) {
341 356 return '';
@@ -340,8 +355,12 @@
340 355 if (!defined('FLUENTCRM')) {
341 356 return '';
342 357 }
343 358
359 + if (!$id) {
360 + return null;
361 + }
362 +
344 363 $contact = \FluentCrm\App\Models\Subscriber::with(['tags', 'lists'])->find($id);
345 364
346 365 if (!$contact) {
347 366 return null;
@@ -709,8 +728,9 @@
709 728 'moved' => __('moved', 'fluent-boards'),
710 729 ];
711 730
712 731 $columnTranslations = [
732 + Constant::ACTIVITY_CUSTOM_FIELD => __('custom field', 'fluent-boards'),
713 733 'task' => __('task', 'fluent-boards'),
714 734 'description' => __('description', 'fluent-boards'),
715 735 'board' => __('board', 'fluent-boards'),
716 736 'assignee' => __('assignee', 'fluent-boards'),