File tree 1 file changed +14
-1
lines changed
app/Domain/Plugins/Models
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ class InstalledPlugin implements PluginDisplayStrategy
45
45
46
46
public ?string $ calculatedMonthlyPrice ;
47
47
48
+ public ?string $ identifier ;
49
+
48
50
public function getCardDesc (): string
49
51
{
50
52
return $ this ->description ??= '' ;
@@ -157,6 +159,17 @@ public function getType(): string
157
159
158
160
public function getIdentifier (): string
159
161
{
160
- return Str::replace ('/ ' , '_ ' , Str::lower ($ this ->name ));
162
+ if (isset ($ this ->identifier ) && $ this ->identifier !== null && $ this ->identifier !== '' ) {
163
+ return $ this ->identifier ;
164
+ }
165
+
166
+ // There are circumstances where name needs to be used. The root cause has been fixed and identifier should
167
+ // be set most of the time however in rare circumstances we need to make sure the name is built correctly
168
+ $ name = Str::replace ('/ ' , '_ ' , Str::lower ($ this ->name ));
169
+ if (Str::contains ($ name , '_ ' ) === false ) {
170
+ $ name = "leantime_ " .$ name ;
171
+ }
172
+
173
+ return $ name ;
161
174
}
162
175
}
You can’t perform that action at this time.
0 commit comments