| @@ 339-350 (lines=12) @@ | ||
| 336 | $this->model->tags()->sync($tags->pluck('id')->all()); |
|
| 337 | ||
| 338 | // Activity is added when new issue create with tags or updated with tags excluding the open status tag |
|
| 339 | if (!empty($removedTags) || !empty($addedTags)) { |
|
| 340 | // Add this change to messages queue |
|
| 341 | // $this->queueChangeTags($this, $addedTags, $removedTags, $this->user);// TODO |
|
| 342 | ||
| 343 | // Add to activity log for tags if changed |
|
| 344 | $this->saveToActivities([ |
|
| 345 | 'type_id' => Activity::TYPE_ISSUE_TAG, |
|
| 346 | 'parent_id' => $this->model->project->id, |
|
| 347 | 'user_id' => $this->model->user->id, |
|
| 348 | 'data' => ['added_tags' => $addedTags, 'removed_tags' => $removedTags], |
|
| 349 | ]); |
|
| 350 | } |
|
| 351 | ||
| 352 | return true; |
|
| 353 | } |
|
| @@ 121-132 (lines=12) @@ | ||
| 118 | $this->tags()->sync($tags->pluck('id')->all()); |
|
| 119 | ||
| 120 | // Activity is added when new issue create with tags or updated with tags excluding the open status tag |
|
| 121 | if (!empty($removedTags) || !empty($addedTags)) { |
|
| 122 | // Add this change to messages queue |
|
| 123 | // $this->queueChangeTags($this, $addedTags, $removedTags, $this->user);// TODO |
|
| 124 | ||
| 125 | // Add to activity log for tags if changed |
|
| 126 | $this->activities()->save(new User\Activity([ |
|
| 127 | 'type_id' => Activity::TYPE_ISSUE_TAG, |
|
| 128 | 'parent_id' => $this->project->id, |
|
| 129 | 'user_id' => $this->user->id, |
|
| 130 | 'data' => ['added_tags' => $addedTags, 'removed_tags' => $removedTags], |
|
| 131 | ])); |
|
| 132 | } |
|
| 133 | ||
| 134 | return true; |
|
| 135 | } |
|