PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.1.0
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.1.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 1.41 All 42 releases
← All changes | app/Models/Task.php +17 -0 2.0.12.1.0 View file →
@@ -232,8 +232,20 @@
232 232 $boardQuery->excludeTemplates();
233 233 });
234 234 }
235 235
236 + /**
237 + * Limit tasks to active, non-template boards available in this install.
238 + */
239 + public function scopeOnActiveAvailableBoards($query)
240 + {
241 + return $query->whereHas('board', function ($boardQuery) {
242 + $boardQuery->whereNull('archived_at')
243 + ->excludeTemplates()
244 + ->availableInCurrentInstall();
245 + });
246 + }
247 +
236 248 public function assignees()
237 249 {
238 250 return $this->belongsToMany(
239 251 User::class,
@@ -260,8 +272,13 @@
260 272 }
261 273
262 274 public function attachments() //may not need in future
263 275 {
276 + if (!defined('FLUENT_BOARDS_PRO_VERSION')) {
277 + return $this->hasMany(Attachment::class, 'id', 'id')
278 + ->where('id', 0);
279 + }
280 +
264 281 return $this->hasMany(TaskAttachment::class,
265 282 'object_id', 'id')
266 283 ->where('object_type', Constant::OBJECT_TYPE_TASK);
267 284 }