Skip to content

Commit f8f8b3c

Browse files
committed
remove riada import
1 parent e57d44b commit f8f8b3c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

kotlin-insight-client/kotlin-insight-client-sdk/src/main/kotlin/com/linkedplanet/kotlininsightclient/sdk/SdkInsightObjectOperator.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean
6464
import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean.Type
6565
import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeBean
6666
import com.riadalabs.jira.plugins.insight.services.model.factory.ObjectAttributeBeanFactory
67-
import io.riada.core.collector.model.toDisplayValue
6867
import java.time.ZoneId
6968
import java.util.*
7069

@@ -329,7 +328,12 @@ object SdkInsightObjectOperator : InsightObjectOperator {
329328
val objTypeAttributeBean = objectTypeAttributeBeans.typeForBean(objAttributeBean).bind()
330329
mapAttributeBeanToInsightAttribute(objAttributeBean, objTypeAttributeBean).bind()
331330
}
332-
val objectSelf = "${baseUrl}/secure/insight/assets/${objectBean.objectKey}"
331+
val objectSelf =
332+
attributes
333+
.singleOrNull { it.schema?.name == "Link" }
334+
?.toString()
335+
?: "${baseUrl}/secure/insight/assets/${objectBean.objectKey}"
336+
333337
InsightObject(
334338
InsightObjectTypeId(objectBean.objectTypeId),
335339
InsightObjectId(objectBean.id),
@@ -338,7 +342,7 @@ object SdkInsightObjectOperator : InsightObjectOperator {
338342
objectBean.label,
339343
attributes,
340344
hasAttachments,
341-
attributes.singleOrNull { it.schema?.name == "Link" }?.toDisplayValue() as? String ?: objectSelf
345+
objectSelf
342346
)
343347
}
344348

0 commit comments

Comments
 (0)