File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
kotlin-insight-client/kotlin-insight-client-sdk/src/main/kotlin/com/linkedplanet/kotlininsightclient/sdk Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean
6464import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean.Type
6565import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeBean
6666import com.riadalabs.jira.plugins.insight.services.model.factory.ObjectAttributeBeanFactory
67- import io.riada.core.collector.model.toDisplayValue
6867import java.time.ZoneId
6968import 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
You can’t perform that action at this time.
0 commit comments