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

STSMACOM-858: Display Unknown user when the creator was deleted (follow-up) #1521

Merged
merged 9 commits into from
Oct 7, 2024
2 changes: 2 additions & 0 deletions lib/ControlledVocab/ControlledVocab.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ class ControlledVocab extends React.Component {
user = <Link to={`/users/view/${metadata.updatedByUserId}`}>{name}</Link>;
} else if (metadata.updatedByUserId === SYSTEM_USER_ID || !metadata.updatedByUserId) {
user = <FormattedMessage id="stripes-smart-components.system" />;
} else {
user = <FormattedMessage id="stripes-components.metaSection.unknownUser" />;
}

return (
Expand Down
4 changes: 2 additions & 2 deletions lib/ControlledVocab/tests/ControlledVocab-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ describe('ControlledVocab', () => {

it('should have row count 7', () => cv.has({ rowCount: 7 }));

it('should render the row with last updated by user-1 without user firstname or lastname', async () => {
await mcl.find(MultiColumnListCell({ row: 4, columnIndex: 3, content: '4/18/2019 by ' })).exists();
it('should render the row with last updated by unknown user without user firstname or lastname', async () => {
await mcl.find(MultiColumnListCell({ row: 5, columnIndex: 3, content: '4/18/2019 by Unknown user' })).exists();
});

it('should render the row with last updated by system with "System" text', async () => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"node": ">=14.0.0"
},
"stripes": {
"actsAs": [],
"okapiInterfaces": {
"notes": "2.0 3.0",
"tags": "1.0",
Expand Down
Loading