diff --git a/claims/claim-utils/claimHelper.class.ts b/claims/claim-utils/claimHelper.class.ts index 74349800..d3fb38f4 100644 --- a/claims/claim-utils/claimHelper.class.ts +++ b/claims/claim-utils/claimHelper.class.ts @@ -28,6 +28,7 @@ export class ClaimResult { export class ClaimProject { public funderId: string; + public funderShortname: string; public funderName: string; public acronym: string; public startDate: string; diff --git a/claims/claim-utils/claimProjectSearchForm.component.ts b/claims/claim-utils/claimProjectSearchForm.component.ts index 27ec74d5..70b154e6 100644 --- a/claims/claim-utils/claimProjectSearchForm.component.ts +++ b/claims/claim-utils/claimProjectSearchForm.component.ts @@ -178,9 +178,10 @@ export class ClaimProjectsSearchFormComponent { const entity: ClaimEntity = new ClaimEntity(); entity.project = new ClaimProject(); entity.project.funderId = item.funderId; - entity.project.funderName = item.funderShortname; + entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId.split("::")[1]); + entity.project.funderName = item.funderName; entity.id = item.id; - entity.project.url = properties.searchLinkToProject + entity.id; + entity.project.url = (item.code !="unidentified") ? properties.searchLinkToProject + entity.id : null; entity.title = item.title.name; entity.project.acronym = item.acronym; entity.project.startDate = item.startYear; diff --git a/claims/directLinking/directLinking.component.ts b/claims/directLinking/directLinking.component.ts index 3fcd7537..70d46032 100644 --- a/claims/directLinking/directLinking.component.ts +++ b/claims/directLinking/directLinking.component.ts @@ -156,6 +156,7 @@ export class DirectLinkingComponent { entity.project.code = project.code; entity.project.endDate = project.endDate; entity.project.funderId = project.funderId; + entity.project.funderShortname = project.funderShortName?project.funderShortName:(entity.project.funderId.split("::")[1]); entity.project.funderName = project.funderName; entity.project.fundingLevel0 = project.fundingLevel0; entity.project.jurisdiction = project.jurisdiction; diff --git a/claims/linking/insertClaim/insertClaim.component.ts b/claims/linking/insertClaim/insertClaim.component.ts index 05615ba9..0cf983e5 100644 --- a/claims/linking/insertClaim/insertClaim.component.ts +++ b/claims/linking/insertClaim/insertClaim.component.ts @@ -508,7 +508,7 @@ export class ClaimInsertComponent { entity["linksToProjects"] = []; } let project: ClaimEntity = results[i]; - entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderName + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym); + entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderShortname + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym); } else if (results[i].context) { diff --git a/claims/linking/selected/ClaimEntityProjectMetadata.component.ts b/claims/linking/selected/ClaimEntityProjectMetadata.component.ts index 0b90acc6..229ebeca 100644 --- a/claims/linking/selected/ClaimEntityProjectMetadata.component.ts +++ b/claims/linking/selected/ClaimEntityProjectMetadata.component.ts @@ -16,10 +16,10 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
-
- Funder: {{entity.project.funderName}} +
+ Funder: {{entity.project.funderName?entity.project.funderName:entity.project.funderShortname}}
-
+
Project Code: {{entity.project.code}}
diff --git a/services/servicesUtils/refineResults.class.ts b/services/servicesUtils/refineResults.class.ts index dcd48d17..dd802f32 100644 --- a/services/servicesUtils/refineResults.class.ts +++ b/services/servicesUtils/refineResults.class.ts @@ -70,7 +70,7 @@ export class RefineResultsUtils { } public static inParenthesisThePartAfterCharacters(field, characters):string { if( field.name.indexOf(characters) !=-1){ - return field.name.split(characters)[0]+" ("+field.name.split(characters)[1]+")"; + return field.name.split(characters)[0]+ (field.name.split(characters)[1]?(" ("+field.name.split(characters)[1]+")"):""); } return field.name; diff --git a/utils/entitiesAutoComplete/entitySearch.service.ts b/utils/entitiesAutoComplete/entitySearch.service.ts index f7cc9478..5580445f 100644 --- a/utils/entitiesAutoComplete/entitySearch.service.ts +++ b/utils/entitiesAutoComplete/entitySearch.service.ts @@ -237,7 +237,8 @@ private fetch (link,id,oafEntityType,type, properties:EnvProperties ){ if(resData['fundingtree'] && resData['fundingtree']['funder']){ value.funderId = (resData['fundingtree']['funder']['id'] )?resData['fundingtree']['funder']['id']:""; - value.funderName = (resData['fundingtree']['funder']['shortname'] )?resData['fundingtree']['funder']['shortname']:""; + value.funderName = (resData['fundingtree']['funder']['name'] )?resData['fundingtree']['funder']['name']:""; + value.funderShortName = (resData['fundingtree']['funder']['shortname'] )?resData['fundingtree']['funder']['shortname']:""; value.jurisdiction = (resData['fundingtree']['funder']['jurisdiction'] )?resData['fundingtree']['funder']['jurisdiction']:""; if(resData['fundingtree']['funding_level_2']){ value.fundingLevel0 = (resData['fundingtree']['funding_level_2'] && resData['fundingtree']['funding_level_2']['parent'] &&