Skip to content

(feat): Add enforced password change functionality to user management #678

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

its-kios09
Copy link
Collaborator

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • I checked for feature overlap with existing widgets.

Summary

Screenshots

None.

Related Issue

None.

Other

None.

@its-kios09 its-kios09 requested review from Copilot and donaldkibet May 29, 2025 04:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an enforced password change feature to the user management functionality. It updates the user property types, adjusts the form schema to include a new forcePasswordChange field with a default value, and maps UI values to API payloads accordingly.

  • Updated UserProperties type to include a required forcePassword field and made other properties optional.
  • Extended the user management form schema to include a forcePasswordChange boolean with a default false value.
  • Modified the user management workspace to initialize and map the forcePasswordChange value between the UI and backend.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/esm-admin-app/src/types/index.ts Updated the UserProperties interface to mark certain fields as optional and added a new forcePassword field.
packages/esm-admin-app/src/components/users/userManagementFormSchema.tsx Added a default value for forcePasswordChange to strengthen form validation.
packages/esm-admin-app/src/components/users/manage-users/user-management.workspace.tsx Adjusted initial values and payload mapping to support the enforced password change functionality.

@donaldkibet
Copy link
Contributor

@its-kios09 kindly share a video of this feature

@its-kios09
Copy link
Collaborator Author

@donaldkibet ping
forceChangePassword

@donaldkibet
Copy link
Contributor

donaldkibet commented May 29, 2025

Is the user forced to change the password on login, Observed that we are getting error 500 on login, Also remove the uploaded video since it contains live health care work information, in sub-subsequent videos avoid sharing with live data

@its-kios09
Copy link
Collaborator Author

@donaldkibet, the issue is not from the frontend that is causing the Message Infinite recursion (StackOverflowError) (through reference chain: org.hibernate.collection.internal.PersistentSortedSet[0]->org.openmrs.PersonName["creator"]- is a backend issue, there is a fragment that was implemented on 2.x we need to retire it to stop causing the infinite recursion, it is a work we were suppose to clean the backend with makombe before the priority work roles popped

cc @makombe

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