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

Fix the group last modified time in group list view #7232

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/perfect-geese-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/admin.groups.v1": patch
---

Fix the issue of displaying group created time for the last modified in the group list view
5 changes: 4 additions & 1 deletion features/admin.groups.v1/components/group-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ export const GroupList: React.FunctionComponent<GroupListProps> = (props: GroupL
key: "lastModified",
render: (group: GroupsInterface): ReactNode => {
const now: Moment = moment(new Date());
const receivedDate: Moment = moment(group.meta.created);
const receivedDate: Moment = moment(group.meta.lastModified ?
group.meta.lastModified :
group.meta.created
);

return t("console:common.dateTime.humanizedDateString", {
date: moment.duration(now.diff(receivedDate)).humanize()
Expand Down
Loading