SeedCompany / cord-api-v3

Bible translation project management API
MIT License
18 stars 4 forks source link

WIP #3229

Closed atGit2021 closed 1 month ago

atGit2021 commented 1 month ago

Creating Draft PR in order to tie this to the front end PR

github-actions[bot] commented 1 month ago

🗞 GraphQL Summary

View schema changes ```diff @@ -1604,8 +1604,28 @@ """ transition: ID } +input ExecuteProjectTransitionInput { + """ + Bypass the workflow, and go straight to this state. + `transition` is not required and ignored when using this. + """ + bypassTo: ProjectStep + + """Any additional user notes related to this transition""" + notes: RichText + + """The project ID to transition""" + project: ID! + + """ + The transition `key` to execute. + This is required unless specifying bypassing the workflow with a `step` input. + """ + transition: ID +} + """ First scripture that has been created but managed _outside_ of CORD. `hasFirst` will always be true. """ type ExternalFirstScripture implements FirstScripture { @@ -2229,8 +2249,9 @@ """The project members""" team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! type: ProjectType! + workflowEvents: [ProjectWorkflowEvent!]! } type InternshipProjectListOutput implements PaginatedList { """Whether the next page exists""" @@ -2727,8 +2748,9 @@ """The project members""" team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! type: ProjectType! + workflowEvents: [ProjectWorkflowEvent!]! } input MoveFileInput { """The file or directory's ID""" @@ -2843,8 +2865,9 @@ """The project members""" team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! type: ProjectType! + workflowEvents: [ProjectWorkflowEvent!]! } type Mutation { """Add a location to a language""" @@ -3097,8 +3120,9 @@ """ pinned: Boolean ): Boolean! transitionProgressReport(input: ExecuteProgressReportTransitionInput!): ProgressReport! + transitionProject(input: ExecuteProjectTransitionInput!): Project! """Update a budget""" updateBudget(input: UpdateBudgetInput!): UpdateBudgetOutput! @@ -4419,8 +4443,9 @@ """The project members""" team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! type: ProjectType! + workflowEvents: [ProjectWorkflowEvent!]! } type ProjectChangeRequest implements Changeset & Resource { """Whether the changes have been applied to live data""" @@ -4623,19 +4648,35 @@ PendingReactivationApproval PendingRegionalDirectorApproval PendingSuspensionApproval PendingTerminationApproval + + """@label Pending Field Operations Approval""" PendingZoneDirectorApproval PrepForConsultantEndorsement PrepForFinancialEndorsement Rejected Suspended Terminated } +""" +A transition for the project workflow. + +This is not a normalized entity. +A transition represented by its `key` can have different field values +based on the workflow's state. +""" type ProjectStepTransition { disabled: Boolean! disabledReason: String + + """ + An local identifier for this transition. + It cannot be used to globally identify a transition. + It is passed to the transition mutation. + """ + key: ID! label: String! to: ProjectStep! type: TransitionType! } @@ -4668,8 +4709,19 @@ projectTypes: [ProjectType!]! user: ID! } +type ProjectWorkflowEvent { + at: DateTime! + id: ID! + notes: SecuredRichTextNullable! + to: ProjectStep! + + """The transition taken, null if workflow was bypassed""" + transition: ProjectStepTransition + who: SecuredUser! +} + type Prompt { """Whether the requesting user can delete this resource""" canDelete: Boolean! createdAt: DateTime! @@ -6163,9 +6215,9 @@ """ type SecuredProjectStep implements Secured { """ Is the current user allowed to bypass transitions entirely - and change the step to any other step? + and change the status to any other step? """ canBypassTransitions: Boolean! canEdit: Boolean! canRead: Boolean! @@ -6648,8 +6700,9 @@ """The project members""" team(input: ProjectMemberListInput = {count: 25, filter: {}, order: ASC, page: 1, sort: "createdAt"}): SecuredProjectMemberList! type: ProjectType! + workflowEvents: [ProjectWorkflowEvent!]! } type TranslationProjectListOutput implements PaginatedList { """Whether the next page exists""" ```
CarsonF commented 1 month ago

I'd rather have the PR come from myself for this for historical records and since it's so large.

atGit2021 commented 1 month ago

Sorry, I created a branch off of your branch for the 0883 task and thought it would be a separate PR, but after I opened it I realized it just gets added to your project-workflow PR.

I also created a cordfield repo PR for the front end work, but I needed a backend PR to tie it too so the schema would not throw errors during the CI tests

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Carson Full @.> Sent: Friday, June 7, 2024 7:59:37 AM To: SeedCompany/cord-api-v3 @.> Cc: Andre Turner @.>; Author @.> Subject: Re: [SeedCompany/cord-api-v3] WIP (PR #3229)

I'd rather have the PR come from myself for this for historical records and since it's so large.

— Reply to this email directly, view it on GitHubhttps://github.com/SeedCompany/cord-api-v3/pull/3229#issuecomment-2154787351, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATAHBQJW4BQ5N5VTT5V4H2TZGGVDTAVCNFSM6AAAAABI22WMYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUG44DOMZVGE. You are receiving this because you authored the thread.Message ID: @.***>

CarsonF commented 1 month ago

Sorry, I created a branch off of your branch for the 0883 task and thought it would be a separate PR, but after I opened it I realized it just gets added to your project-workflow PR.

np that one just needs the base branch changed to this branch. I'll do that. I'll still use this branch to make a PR.

I also created a cordfield repo PR for the front end work, but I needed a backend PR to tie it too so the schema would not throw errors during the CI tests

Yeah that's valid. I probably would've made a draft PR for you for that. That one is cool hanging out for a bit though. This work doesn't have breaking changes.