Browse Source

添加namerule的自定义分组配置1

kely 11 months ago
parent
commit
7b9b79eb6e
2 changed files with 2 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/API/CustomFieldController.php
  2. 1 0
      config/custom-field.php

+ 1 - 1
app/Http/Controllers/API/CustomFieldController.php

@@ -77,7 +77,7 @@ class CustomFieldController extends Controller
         $nameRuleGroup = NamingRule::query()->where('id',$nameGroupId)->get();
         $allGroups=config("custom-field.groups");
         if(!empty($nameRuleGroup)){
-            if(in_array($allGroups,$nameRuleGroup->pluck('id')->toArray())){
+            if(!in_array($allGroups,$nameRuleGroup->pluck('id')->toArray())){
                 throw new \Exception("Please contact the administrator to add the namerule configuration.");
             }
         }

+ 1 - 0
config/custom-field.php

@@ -7,5 +7,6 @@ return [
     'groups' => [
         'task',
         'project',
+        '1',
     ]
 ];