From b0108f442fcecdd685dce10abadffd69aa553557 Mon Sep 17 00:00:00 2001 From: German Martinez Date: Thu, 14 Nov 2024 09:09:56 -0500 Subject: [PATCH 01/12] =?UTF-8?q?=F0=9F=90=9Bfix(KP):=20adding=20missing?= =?UTF-8?q?=20nullcheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../results-knowledge-products.mapper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts b/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts index 06d173d14..a931342ca 100644 --- a/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts +++ b/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts @@ -76,7 +76,9 @@ export class ResultsKnowledgeProductMapper { }); const keywords = - dto?.agrovoc_keywords?.results ?? dto?.['AGROVOC Keywords'].results ?? []; + dto?.agrovoc_keywords?.results ?? + dto?.['AGROVOC Keywords']?.results ?? + []; knowledgeProductDto.keywords = (keywords ?? []) .filter((k) => !k.is_agrovoc) .map((k) => k.keyword); From a31b94641df9b315d8f426ac2594ca9675564b07 Mon Sep 17 00:00:00 2001 From: xKeCo Date: Thu, 14 Nov 2024 14:48:47 -0500 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=90=9B=20fix(Notification=20Item):?= =?UTF-8?q?=20Corrected=20the=20order=20of=20official=20codes=20in=20notif?= =?UTF-8?q?ication=20messages=20for=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...notification-item-innovation.component.html | 18 +++++++++--------- .../notification-item-innovation.component.ts | 15 +++++++++++---- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.html b/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.html index 9993cffd4..c2a212455 100644 --- a/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.html +++ b/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.html @@ -2,15 +2,15 @@ arrow_right_alt
- Request from {{ notification?.requester_official_code }} to add {{ notification?.approving_official_code }} as a contributor to the result: + Request from {{ notification?.approving_official_code }} to add {{ notification?.requester_official_code }} as a contributor to the result:
- {{ notification?.requester_official_code }} requests to be added as a contributor to the result: + {{ notification?.approving_official_code }} requests to be added as a contributor to the result:
- ({{ notification?.requester_official_code }}) - {{ notification?.result_type_name }} - + ({{ notification?.approving_official_code }}) - {{ notification?.result_type_name }} - (Result code: {{ notification?.result_code }}) {{ notification?.title }} @@ -18,7 +18,7 @@
-
{{ notification?.requester_official_code }} requests to be added as a contributor to the result:
+
{{ notification?.approving_official_code }} requests to be added as a contributor to the result:
-
{{ notification?.requester_official_code }} requests to be added as a contributor to the result:
+
{{ notification?.approving_official_code }} requests to be added as a contributor to the result:
- ({{ notification?.approving_official_code }}) - {{ notification?.result_type_name }} - + ({{ notification?.requester_official_code }}) - {{ notification?.result_type_name }} - (Result code: {{ notification?.result_code }}) {{ notification?.title }} @@ -102,7 +102,7 @@
- Request from {{ notification?.requester_official_code }} to {{ notification?.approving_official_code }} to be added as a contributor to the + Request from {{ notification?.approving_official_code }} to {{ notification?.requester_official_code }} to be added as a contributor to the result:
diff --git a/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.ts b/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.ts index ce5eb8d73..ad4b98273 100644 --- a/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.ts +++ b/onecgiar-pr-client/src/app/pages/ipsr/pages/innovation-package-list-content/pages/innovation-packages-notification/component/notification-item-innovation/notification-item-innovation.component.ts @@ -16,7 +16,11 @@ export class NotificationItemInnovationComponent { requesting = false; submitter = true; - constructor(public api: ApiService, private shareRequestModalSE: ShareRequestModalService, private retrieveModalSE: RetrieveModalService) {} + constructor( + public api: ApiService, + private shareRequestModalSE: ShareRequestModalService, + private retrieveModalSE: RetrieveModalService + ) {} mapAndAccept(notification) { if (this.requesting || this.api.rolesSE.platformIsClosed || this.isQAed || !this.notification?.version_status) { @@ -59,9 +63,12 @@ export class NotificationItemInnovationComponent { this.api.dataControlSE.currentResult.result_type = result_type_name; this.api.dataControlSE.currentNotification = notification; - this.shareRequestModalSE.shareRequestBody.initiative_id = approving_inititiative_id; - this.shareRequestModalSE.shareRequestBody.official_code = approving_official_code; - this.shareRequestModalSE.shareRequestBody.short_name = approving_short_name; + this.shareRequestModalSE.shareRequestBody.initiative_id = + approving_inititiative_id !== owner_initiative_id ? approving_inititiative_id : requester_initiative_id; + this.shareRequestModalSE.shareRequestBody.official_code = + approving_inititiative_id !== owner_initiative_id ? approving_official_code : requester_official_code; + this.shareRequestModalSE.shareRequestBody.short_name = + approving_inititiative_id !== owner_initiative_id ? approving_short_name : requester_short_name; this.shareRequestModalSE.shareRequestBody.result_toc_results.push({ action_area_outcome_id: null, From 8f5e749d6736c2ef19c282cfec10670a15e1db93 Mon Sep 17 00:00:00 2001 From: German Martinez Date: Thu, 14 Nov 2024 15:18:14 -0500 Subject: [PATCH 03/12] =?UTF-8?q?=F0=9F=90=9Bfix(IPSR):=20fixing=20step=20?= =?UTF-8?q?4=20green=20check=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lts-innovation-packages-validation-module.repository.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts b/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts index 57f307064..8cacd8ff9 100644 --- a/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts +++ b/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts @@ -959,9 +959,7 @@ export class ResultsInnovationPackagesValidationModuleRepository extends Reposit ) AND( ripb.current_year IS NULL - OR ripb.current_year = 0 OR ripb.next_year IS NULL - OR ripb.next_year = 0 ) ) > 0 THEN FALSE WHEN ( @@ -986,9 +984,7 @@ export class ResultsInnovationPackagesValidationModuleRepository extends Reposit ) AND( nppb.in_kind IS NULL - OR nppb.in_kind = 0 OR nppb.in_cash IS NULL - OR nppb.in_cash = 0 ) ) > 0 THEN FALSE WHEN ( @@ -1013,12 +1009,9 @@ export class ResultsInnovationPackagesValidationModuleRepository extends Reposit ) AND ( ribu.in_kind IS NULL - OR ribu.in_kind = 0 OR ribu.in_cash IS NULL - OR ribu.in_cash = 0 ) ) > 0 THEN FALSE - WHEN rip.is_result_ip_published IS NULL THEN FALSE ELSE TRUE END AS validation FROM From a5c5b6607b20b780bf36c229f58ec2bb4cd2cdb2 Mon Sep 17 00:00:00 2001 From: German Martinez Date: Thu, 14 Nov 2024 15:38:45 -0500 Subject: [PATCH 04/12] =?UTF-8?q?=F0=9F=90=9Bfix(IPSR):=20fixing=20step=20?= =?UTF-8?q?1=20green=20check=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n-packages-validation-module.repository.ts | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts b/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts index 8cacd8ff9..40d04227d 100644 --- a/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts +++ b/onecgiar-pr-server/src/api/ipsr/results-innovation-packages-validation-module/results-innovation-packages-validation-module.repository.ts @@ -471,60 +471,6 @@ export class ResultsInnovationPackagesValidationModuleRepository extends Reposit AND rbi2.is_active = TRUE ) ) THEN FALSE - WHEN ( - SELECT - COUNT(*) - FROM - result_ip_expert rie - WHERE - rie.is_active = TRUE - AND rie.result_id = r.id - AND rie.result_ip_expert_id IN ( - SELECT - rie2.result_ip_expert_id - FROM - result_ip_expertises rie2 - WHERE - rie2.result_ip_expert_id = rie.result_ip_expert_id - AND rie2.is_active = true - ) - ) = 0 THEN FALSE - WHEN ( - SELECT - COUNT(*) - FROM - result_ip_expert rie3 - WHERE - rie3.result_id = r.id - AND rie3.is_active = TRUE - AND ( - NOT EXISTS ( - SELECT - rie4.result_ip_expert_id - FROM - result_ip_expertises rie4 - WHERE - rie4.result_ip_expert_id = rie3.result_ip_expert_id - AND rie4.is_active = true - ) - ) - ) > 1 THEN FALSE - WHEN ( - SELECT - COUNT(*) - FROM - result_innovation_package rip - WHERE - result_innovation_package_id = r.id - AND is_active = TRUE - AND ( - rip.experts_is_diverse IS NULL - OR ( - rip.experts_is_diverse = FALSE - AND rip.is_not_diverse_justification IS NULL - ) - ) - ) = 1 THEN FALSE WHEN ( SELECT COUNT(*) From 891c51fe7328712aca3d75abfda3bdbdd7e3812f Mon Sep 17 00:00:00 2001 From: xKeCo Date: Fri, 15 Nov 2024 08:33:55 -0500 Subject: [PATCH 05/12] :recycle: refactor (Knowledge Product Selector): Refactor delivery buttons to use dynamic options for improved maintainability --- .../knowledge-product-selector.component.html | 41 ++++++------------- .../knowledge-product-selector.component.ts | 7 ++++ 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.html b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.html index 448912436..aad50c049 100644 --- a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.html +++ b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.html @@ -80,34 +80,19 @@

Partner role: *
- - - - + @for (delivery of deliveryOptions; track $index) { + + + + }

diff --git a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.ts b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.ts index e31fb06fc..fa60a32f2 100644 --- a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.ts +++ b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-partners/components/knowledge-product-selector/knowledge-product-selector.component.ts @@ -18,6 +18,13 @@ export class KnowledgeProductSelectorComponent { alertStatusMessage: string = `Partner organizations you collaborated with or are currently collaborating with to generate this result.
  • Please note that CGIAR Centers are not listed here. They are directly linked to Section 2, Theory of Change.
  • `; + deliveryOptions = [ + { id: 1, name: 'Scaling' }, + { id: 2, name: 'Demand' }, + { id: 3, name: 'Innovation' }, + { id: 4, name: 'Other' } + ]; + constructor( public api: ApiService, public institutionsSE: InstitutionsService, From 83b4ddc8c1ec095a456a4388faf8f2f2a5a63a29 Mon Sep 17 00:00:00 2001 From: German Martinez Date: Fri, 15 Nov 2024 09:45:22 -0500 Subject: [PATCH 06/12] =?UTF-8?q?=F0=9F=90=9Bfix(KP):=20fixing=20boolean?= =?UTF-8?q?=20conversion=20on=20query=20=F0=9F=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/auth/modules/role-by-user/RoleByUser.repository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onecgiar-pr-server/src/auth/modules/role-by-user/RoleByUser.repository.ts b/onecgiar-pr-server/src/auth/modules/role-by-user/RoleByUser.repository.ts index 545fa36ae..af21fd980 100644 --- a/onecgiar-pr-server/src/auth/modules/role-by-user/RoleByUser.repository.ts +++ b/onecgiar-pr-server/src/auth/modules/role-by-user/RoleByUser.repository.ts @@ -29,7 +29,7 @@ export class RoleByUserRepository extends Repository { try { const isAdmin = await this.query(queryData, [userId]); if (isAdmin?.length > 0) { - return Boolean(isAdmin[0].is_admin); + return !!parseInt(isAdmin[0].is_admin); } return null; From 0df8d3ed5769a6d2ad7e961225483b608b9b35b0 Mon Sep 17 00:00:00 2001 From: xKeCo Date: Fri, 15 Nov 2024 11:07:59 -0500 Subject: [PATCH 07/12] =?UTF-8?q?=F0=9F=90=9B=20fix=20(Knowledge=20Product?= =?UTF-8?q?=20Metadata):=20Update=20accessibility=20property=20type=20to?= =?UTF-8?q?=20boolean=20and=20adjust=20related=20logic=20for=20improved=20?= =?UTF-8?q?accuracy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: German Camilo Martinez Gelves <54682133+gcmartinezg@users.noreply.github.com> --- .../knowledge-product-info.component.ts | 4 +-- .../results-knowledge-product-metadata.dto.ts | 2 +- .../results-knowledge-products.mapper.ts | 27 +++++++++++++------ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-result-types-pages/knowledge-product-info/knowledge-product-info.component.ts b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-result-types-pages/knowledge-product-info/knowledge-product-info.component.ts index 49a32cf37..cc1ae3bdf 100644 --- a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-result-types-pages/knowledge-product-info/knowledge-product-info.component.ts +++ b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-result-types-pages/knowledge-product-info/knowledge-product-info.component.ts @@ -118,10 +118,10 @@ export class KnowledgeProductInfoComponent implements OnInit { mapped.is_peer_reviewed_CG = this.transformBoolean(response.metadataCG?.is_peer_reviewed); mapped.is_isi_CG = this.transformBoolean(response.metadataCG?.is_isi); let accessibilityCG: string; - if (!response.metadataCG?.accessibility) { + if (response.metadataCG?.accessibility == null) { accessibilityCG = 'Not available'; } else { - accessibilityCG = response.metadataCG.accessibility === 'yes' ? 'Open Access' : 'Limited Access'; + accessibilityCG = response.metadataCG.accessibility ? 'Open Access' : 'Limited Access'; } mapped.accessibility_CG = accessibilityCG; mapped.yearCG = response.metadataCG?.issue_year; diff --git a/onecgiar-pr-server/src/api/results/results-knowledge-products/dto/results-knowledge-product-metadata.dto.ts b/onecgiar-pr-server/src/api/results/results-knowledge-products/dto/results-knowledge-product-metadata.dto.ts index 48b281ff6..938e7e853 100644 --- a/onecgiar-pr-server/src/api/results/results-knowledge-products/dto/results-knowledge-product-metadata.dto.ts +++ b/onecgiar-pr-server/src/api/results/results-knowledge-products/dto/results-knowledge-product-metadata.dto.ts @@ -1,7 +1,7 @@ export class ResultsKnowledgeProductMetadataDto { source: string; is_isi: boolean; - accessibility: string; + accessibility: boolean; issue_year: number; online_year: number; doi: string; diff --git a/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts b/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts index a931342ca..01d46840b 100644 --- a/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts +++ b/onecgiar-pr-server/src/api/results/results-knowledge-products/results-knowledge-products.mapper.ts @@ -94,12 +94,15 @@ export class ResultsKnowledgeProductMapper { new ResultsKnowledgeProductMetadataDto(); metadataCGSpace.source = 'CGSpace'; - metadataCGSpace.accessibility = String( - StringContentComparator.contentCompare( - 'Open Access', - dto?.['Open Access'], - ) == 0, - ); + + if (dto?.['Open Access']) { + metadataCGSpace.accessibility = + StringContentComparator.contentCompare( + 'Open Access', + dto?.['Open Access'], + ) == 0; + } + metadataCGSpace.doi = dto?.DOI; metadataCGSpace.is_isi = StringContentComparator.contentCompare('ISI Journal', dto?.ISI) == 0; @@ -124,7 +127,13 @@ export class ResultsKnowledgeProductMapper { new ResultsKnowledgeProductMetadataDto(); metadataWoS.source = mqapDOIData.source; - metadataWoS.accessibility = mqapDOIData.is_oa?.toLocaleLowerCase(); + + if (mqapDOIData.is_oa) { + metadataWoS.accessibility = mqapDOIData.is_oa + ?.toLocaleLowerCase() + ?.includes('yes'); + } + metadataWoS.doi = mqapDOIData.doi; metadataWoS.is_isi = mqapDOIData.is_isi ?.toLocaleLowerCase() @@ -398,7 +407,9 @@ export class ResultsKnowledgeProductMapper { metadataDto.source = m.source; - metadataDto.accessibility = m.accesibility; + metadataDto.accessibility = m.accesibility + ? m.accesibility === 'yes' + : null; metadataDto.doi = m.doi; metadataDto.is_isi = m.is_isi; metadataDto.is_peer_reviewed = m.is_peer_reviewed; From 4abe9289e2fdff9901acb9356e5197b49974feb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20D=2E=20Guzm=C3=A1n?= Date: Mon, 25 Nov 2024 14:53:49 -0500 Subject: [PATCH 08/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(PlatformRep?= =?UTF-8?q?ortService):=20add=20logging=20for=20processed=20result=20code?= =?UTF-8?q?=20input=20for=20Reports=20Ms.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/platform-report/platform-report.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts b/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts index d46ede837..5d6464fee 100644 --- a/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts +++ b/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts @@ -51,6 +51,7 @@ export class PlatformReportService implements OnModuleInit { ) { try { const cleanResultCodeInput = Number(result_code); + this._logger.log(`Result to be processed: ${cleanResultCodeInput}`); if (Number.isNaN(cleanResultCodeInput)) { const error: returnErrorDto = { status: 404, From 75fdd6dfd6a39553a6d215734e91ad0105d6598b Mon Sep 17 00:00:00 2001 From: German Martinez Date: Tue, 26 Nov 2024 10:40:50 -0500 Subject: [PATCH 09/12] =?UTF-8?q?=F0=9F=90=9Bfix(Validation):=20missing=20?= =?UTF-8?q?distinct=20on=20query=20for=20innodev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../results-validation-module.repository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onecgiar-pr-server/src/api/results/results-validation-module/results-validation-module.repository.ts b/onecgiar-pr-server/src/api/results/results-validation-module/results-validation-module.repository.ts index 3077f744f..222fdd0ef 100644 --- a/onecgiar-pr-server/src/api/results/results-validation-module/results-validation-module.repository.ts +++ b/onecgiar-pr-server/src/api/results/results-validation-module/results-validation-module.repository.ts @@ -1339,7 +1339,7 @@ export class resultValidationRepository # validate that question 29 have been answered if question 33 or 34 have been marked as yes IF( ( - SELECT 1 + SELECT DISTINCT 1 FROM result_questions rq2 JOIN result_answers ra2 ON rq2.result_question_id = ra2.result_question_id WHERE ra2.result_id = r.id From 60d4f171c67880ba83f79338ffc37205e069d7d1 Mon Sep 17 00:00:00 2001 From: Cristian Gamboa Date: Wed, 27 Nov 2024 08:16:42 -0500 Subject: [PATCH 10/12] :recycle: refactor(project): Add action to trigger pipeline on code changes --- .github/workflows/jenkins-trigger.yml | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/jenkins-trigger.yml diff --git a/.github/workflows/jenkins-trigger.yml b/.github/workflows/jenkins-trigger.yml new file mode 100644 index 000000000..d4c56fde5 --- /dev/null +++ b/.github/workflows/jenkins-trigger.yml @@ -0,0 +1,29 @@ +name: Trigger Jenkins Job + +on: + push: + branches: + - '**' # This will trigger the workflow on any branch that receives a push + workflow_dispatch: # This allows the workflow to be manually triggered if needed + +jobs: + trigger-job: + runs-on: ubuntu-latest + + steps: + # Step 1: Get the branch name and build the URL for Jenkins + - name: Get branch name and build Jenkins URL + run: | + BRANCH_NAME=${GITHUB_REF#refs/heads/} # Remove 'refs/heads/' from GITHUB_REF + JENKINS_URL="https://automation.prms.cgiar.org/job/prms-reporting-tool-${BRANCH_NAME}/build" + echo "Jenkins job URL for the branch $BRANCH_NAME is: $JENKINS_URL" + echo "JENKINS_URL=${JENKINS_URL}" >> $GITHUB_ENV + + # Step 2: Execute the curl command to trigger the job in Jenkins with the dynamically built URL + - name: Trigger Jenkins Job + run: | + curl -X POST ${{ env.JENKINS_URL }} --user ${{ secrets.JENKINS_USERNAME }}:${{ secrets.JENKINS_API_TOKEN }} + env: + JENKINS_URL: ${{ env.JENKINS_URL }} + JENKINS_USERNAME: ${{ secrets.JENKINS_USERNAME }} + JENKINS_API_TOKEN: ${{ secrets.JENKINS_API_TOKEN }} \ No newline at end of file From b8a8c54226ffa5296413cb1e394ba296ac435c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20D=2E=20Guzm=C3=A1n?= Date: Thu, 28 Nov 2024 08:58:29 -0500 Subject: [PATCH 11/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(PlatformRep?= =?UTF-8?q?ortService):=20use=20cleaned=20result=20code=20for=20filename?= =?UTF-8?q?=20generation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/platform-report/platform-report.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts b/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts index 5d6464fee..310480742 100644 --- a/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts +++ b/onecgiar-pr-server/src/api/platform-report/platform-report.service.ts @@ -258,7 +258,7 @@ export class PlatformReportService implements OnModuleInit { const fileName = 'PRMS-Result-' + - data.result_code + + cleanResultCodeInput + '_' + data.generation_date_filename + '.pdf'; From aa3f081bf3b02d189aff08d0e7a2a5d7b1fff87f Mon Sep 17 00:00:00 2001 From: German Martinez Date: Mon, 2 Dec 2024 10:30:47 -0500 Subject: [PATCH 12/12] =?UTF-8?q?=F0=9F=90=9Bfix(Section=202):=20re-adding?= =?UTF-8?q?=20condition=20on=20submitter=20dropdown.=20P2-1177?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rd-theory-of-change/rd-theory-of-change.component.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-theory-of-change/rd-theory-of-change.component.html b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-theory-of-change/rd-theory-of-change.component.html index 7a1c966a6..526acc119 100644 --- a/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-theory-of-change/rd-theory-of-change.component.html +++ b/onecgiar-pr-client/src/app/pages/results/pages/result-detail/pages/rd-theory-of-change/rd-theory-of-change.component.html @@ -19,7 +19,9 @@ placeholder="Select Initiative" description="Select an initiative or platform" [(ngModel)]="this.theoryOfChangeBody.changePrimaryInit" - [fieldDisabled]="true"> + [fieldDisabled]=" + !!(this.theoryOfChangeBody.contributing_and_primary_initiative?.length === 1 && this.theoryOfChangeBody?.result_toc_result?.initiative_id) + ">