Skip to content

WIP #3223

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

Closed
wants to merge 11 commits into from
Closed

WIP #3223

wants to merge 11 commits into from

Conversation

atGit2021
Copy link
Contributor

@atGit2021 atGit2021 self-assigned this May 29, 2024
@atGit2021 atGit2021 requested a review from CarsonF as a code owner May 29, 2024 23:45
@atGit2021 atGit2021 removed their assignment May 29, 2024
@CarsonF CarsonF force-pushed the project-workflow branch from cb00e54 to 3421a77 Compare May 30, 2024 14:26
@CarsonF
Copy link
Member

CarsonF commented May 30, 2024

Closing until we are closer to being done

@CarsonF CarsonF closed this May 30, 2024
Copy link

🗞 GraphQL Summary

View schema changes
@@ -1604,8 +1604,28 @@
   """
   transition: ID
 }
 
+input ExecuteProjectTransitionInput {
+  """Any additional user notes related to this transition"""
+  notes: RichText
+
+  """The project ID to transition"""
+  project: ID!
+
+  """
+  Bypass the workflow, and go straight to this step.
+  `transition` is not required and ignored when using this.
+  """
+  step: ProjectStep
+
+  """
+  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"""
@@ -2724,8 +2745,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"""
@@ -2840,8 +2862,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"""
@@ -3094,8 +3117,9 @@
     """
     pinned: Boolean
   ): Boolean!
   transitionProgressReport(input: ExecuteProgressReportTransitionInput!): ProgressReport!
+  transitionProject(input: ExecuteProjectTransitionInput!): Project!
 
   """Update a budget"""
   updateBudget(input: UpdateBudgetInput!): UpdateBudgetOutput!
 
@@ -4416,8 +4440,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"""
@@ -4628,11 +4653,25 @@
   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 project'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 `transitionProject`.
+  """
+  key: ID!
   label: String!
   to: ProjectStep!
   type: TransitionType!
 }
@@ -4665,8 +4704,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!
@@ -6160,9 +6210,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!
@@ -6645,8 +6695,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 CarsonF changed the title Project workflow transitions WIP Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants