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.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 1.40 All 43 releases
← All changes | app/Models/Activity.php +40 -0 1.35 → 2.2.0 View file →
@@ -41,8 +41,48 @@
41 41 {
42 42 return \maybe_unserialize($settings);
43 43 }
44 44
45 + /** Read full custom-field message attributes from their LONGTEXT payload; preserve legacy rows. */
46 + private function customFieldActivityAttribute($key, $fallback)
47 + {
48 + if (empty($this->settings['custom_field_activity_payload'])) {
49 + return $fallback;
50 + }
51 +
52 + $payload = json_decode($this->attributes['description'] ?? '', true);
53 + return is_array($payload) && array_key_exists($key, $payload) ? $payload[$key] : $fallback;
54 + }
55 +
56 + /** Resolve the stored label while preserving display translations applied by the activity service. */
57 + public function getColumnAttribute($value)
58 + {
59 + // Payload rows store this identifier until translateActivities assigns a display label.
60 + if ($value !== Constant::ACTIVITY_CUSTOM_FIELD) {
61 + return $value;
62 + }
63 +
64 + return $this->customFieldActivityAttribute('column', $value);
65 + }
66 +
67 + /** Restore the complete previous value for all activity feeds and serialized responses. */
68 + public function getOldValueAttribute($value)
69 + {
70 + return $this->customFieldActivityAttribute('old_value', $value);
71 + }
72 +
73 + /** Restore the complete new value, including null removals and zero values. */
74 + public function getNewValueAttribute($value)
75 + {
76 + return $this->customFieldActivityAttribute('new_value', $value);
77 + }
78 +
79 + /** Keep storage details out of the user-facing activity description. */
80 + public function getDescriptionAttribute($value)
81 + {
82 + return $this->customFieldActivityAttribute('description', $value);
83 + }
84 +
45 85 /**
46 86 * One2One: Activity belongs to one Task
47 87 * @return \FluentBoards\Framework\Database\Orm\Relations\BelongsTo
48 88 */