Skip to content

Commit

Permalink
Merge pull request #7232 from ThaminduDilshan/thamindu-last-modified
Browse files Browse the repository at this point in the history
Fix the group last modified time in group list view
  • Loading branch information
ThaminduDilshan authored Jan 6, 2025
2 parents 82609e9 + 2b1240e commit 6aca12c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit 6aca12c

Please sign in to comment.