Skip to content

AB#120296 - Draft & Auto Save - #1211

Open
AntoineRelief wants to merge 1 commit into
nextfrom
AB#120296
Open

AB#120296 - Draft & Auto Save#1211
AntoineRelief wants to merge 1 commit into
nextfrom
AB#120296

Conversation

@AntoineRelief

@AntoineRelief AntoineRelief commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

Description

This change stores drafts in the existing Record collection using a draft flag, excludes drafts from normal record queries by default, adds draft-aware form and form-modal flows, and adds draft grid configuration so users can list, edit, publish, export, and delete draft records.

Backend changes include draft-aware record queries, mutations, exports, history, generated schema resolvers, calculated fields, and a migration to add/backfill the draft flag and update indexes.

Useful links

Type of change

  • New feature (non-breaking change which adds functionality)
  • Improvement (refactor or addition to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The implementation was verified with linting, unit tests, backend TypeScript compilation, and Angular builds for all affected frontend apps.

  • npx nx run shared:lint --skip-nx-cache
  • npx nx run shared:test --configuration=ci --skip-nx-cache
  • NODE_OPTIONS=--max-old-space-size=8192 npx nx run back-office:build:local-uat --skip-nx-cache
  • NODE_OPTIONS=--max-old-space-size=8192 npx nx run front-office:build:local-uat --skip-nx-cache
  • NODE_OPTIONS=--max-old-space-size=8192 npx nx run web-widgets:build:local-uat --skip-nx-cache
  • Backend npm run lint
  • Backend npm run build
  • Backend npm run test -- --runInBand

Manual QA checklist:

  1. Create a new record and save it as draft.
  2. Confirm the draft can be loaded from the draft picker.
  3. Confirm form modal auto-save creates/updates drafts.
  4. Submit a loaded draft and confirm it becomes a submitted record.
  5. Configure a grid with "how draft records" and confirm only drafts are shown.
  6. Confirm owner-only draft visibility when "Show all users' drafts" is disabled.
  7. Confirm all users' drafts are visible when "Show all users' drafts" is enabled.
  8. Delete a draft from a draft grid and confirm it is removed.
  9. Confirm normal grids and exports exclude drafts.
  10. Confirm draft grids export drafts.

Screenshots

Screenshots should be added for:

  • Save as draft button / draft picker
image image image image
  • Draft grid settings
image

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@AntoineRelief
AntoineRelief marked this pull request as draft September 22, 2025 07:11
@Joselgc1

Joselgc1 commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

It is necessary to run "npm run migrate:up" on the backend and then start the server using the commented code on the scr/index.ts file in order for the system to synchrony the "incrementalID" field.

@Joselgc1
Joselgc1 changed the base branch from beta to next July 21, 2026 10:01
@Joselgc1
Joselgc1 marked this pull request as ready for review July 21, 2026 20:33
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