Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIN-5619 clone purpose #1355

Open
wants to merge 5 commits into
base: feature/incaricato
Choose a base branch
from

Conversation

sandrotaje
Copy link
Collaborator

@sandrotaje sandrotaje commented Jan 13, 2025

Based on #1326

Smoke tested as:

  • T1 create eservice
  • T1 consumer delegate service to T2
  • T2 approve delegation
  • T2 create an agreement
  • T2 create a Purpose
  • T2 activate a Purpose
  • T2 clone a purpose from both T1 and T2

@sandrotaje sandrotaje changed the base branch from develop to PIN-5816_createPurposeDelegation January 13, 2025 09:04
@sandrotaje sandrotaje force-pushed the PIN-5619_clone_purpose branch from 8a6ed53 to 2b0bc0b Compare January 13, 2025 09:04
@sandrotaje sandrotaje marked this pull request as ready for review January 13, 2025 09:12
Copy link
Collaborator

@ecamellini ecamellini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this functionality still has unresolved doubts in the requirements: https://pagopa.atlassian.net/wiki/spaces/PDNDI/pages/1236959344/SRS+Incaricato#Clonazione-finalit%C3%A0-in-delega

Were these doubts solved?

packages/purpose-process/src/services/purposeService.ts Outdated Show resolved Hide resolved
packages/purpose-process/src/services/purposeService.ts Outdated Show resolved Hide resolved
@@ -1180,6 +1193,21 @@ export function purposeServiceBuilder(

const purposeToClone = await retrievePurpose(purposeId, readModelService);

const activeConsumerDelegation = purposeToClone.data.delegationId
? await retrieveDelegation(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to remove the delegationId from the purpose model (see Slack thread: https://buildo.slack.com/archives/C07U5M9SJ1Y/p1736783396238289) then here we will need to use one of the other readmodel methods (probably getActiveConsumerDelegationByPurpose) as done in other functions here

Base automatically changed from PIN-5816_createPurposeDelegation to feature/incaricato January 14, 2025 08:42
@sandrotaje sandrotaje requested a review from ecamellini January 14, 2025 10:35
@sandrotaje sandrotaje force-pushed the PIN-5619_clone_purpose branch from 3f5b66f to 5250562 Compare January 14, 2025 10:39
@sandrotaje sandrotaje force-pushed the PIN-5619_clone_purpose branch from aac69c1 to 3995b65 Compare January 15, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants