You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Error message displayed as policy instead of workspace #51930
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Version Number: 9.0.56-7 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@quinthar Slack conversation (hyperlinked to channel name): #expensify-bugs
Action Performed:
Prerequisite:
Create a group in a domain
Add a member to the group
Restrict workspace creation for the group
Login as a member of a restricted group
Click settings > Click +workspace
Expected Result:
Error message displayed regarding restriction for workspace creation
Actual Result:
Error message displayed as Your admin has restricted your group from creating new policies
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Error message displayed as policy instead of workspace[/-][+][$250] Error message displayed as policy instead of workspace[/+]on Nov 4, 2024
Please re-state the problem that we are trying to solve in this issue
Error message displayed as Your admin has restricted your group from creating new policies.
What is the root cause of that problem?
Note: I was able to reproduce the issue by adding a custom domain (that I own) via OD as instructed in the documentation here -> Claim And Verify A Domain.
The error message Your admin has restricted your group from creating new policies. shown on the domain member's group side comes from the BE (see below) when the CreateWorkspace API call fails due to the Restrict expense workspace creation/removal being Enabled in OD.
What changes do you think we should make in order to solve the problem?
From what I could gather from the #expensify-bugs Slack discussion seems like the Expected result is:
Please update this error (and review all errors) to not mention "policies". Rather, they are "workspaces".
Therefore the main solution I'm going to propose here is for BE to correct the error message to something like:
Your admin has restricted your group from creating new workspaces.
What alternative solutions did you explore? (Optional)
As an alternative solution (FE based) we could perform a string match of the BE error and if matching Your admin has restricted your group from creating new policies. -> replace it with a new en / es translated error:
Your admin has restricted your group from creating new workspaces.
The code would look something like this:
Note
This is pseudocode-ish, the logic would be adjusted to use translated() and the error string constant will be added to CONST.
constcustomTranslation='Your admin has restricted your group from creating new workspaces.';consttranslatedErrors=Object.fromEntries(Object.entries(policy?.errors??{}).map(([key,value])=>[key,value==='Your admin has restricted your group from creating new policies.' ? customTranslation : value]),);
@garrettmknight@jjcoffee this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
melvin-bot commentedon Nov 2, 2024
Triggered auto assignment to @garrettmknight (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]Error message displayed as policy instead of workspace[/-][+][$250] Error message displayed as policy instead of workspace[/+]melvin-bot commentedon Nov 4, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021853514819272851093
melvin-bot commentedon Nov 4, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)ikevin127 commentedon Nov 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue
Error message displayed as
Your admin has restricted your group from creating new policies.What is the root cause of that problem?
Note: I was able to reproduce the issue by adding a custom domain (that I own) via OD as instructed in the documentation here -> Claim And Verify A Domain.
The error message
Your admin has restricted your group from creating new policies.shown on the domain member's group side comes from the BE (see below) when theCreateWorkspaceAPI call fails due to theRestrict expense workspace creation/removalbeing Enabled in OD.What changes do you think we should make in order to solve the problem?
From what I could gather from the #expensify-bugs Slack discussion seems like the Expected result is:
Therefore the main solution I'm going to propose here is for BE to correct the error message to something like:
Your admin has restricted your group from creating new workspaces.What alternative solutions did you explore? (Optional)
As an alternative solution (FE based) we could perform a string match of the BE error and if matching
Your admin has restricted your group from creating new policies.-> replace it with a newen/estranslated error:Your admin has restricted your group from creating new workspaces.The code would look something like this:
Note
This is pseudocode-ish, the logic would be adjusted to use
translated()and the error string constant will be added toCONST.In WorkspaceInitialPage.tsx before return add the following logic:
and the UI:
Screen.Recording.2024-11-04.at.17.58.30.mov
3 remaining items
bondydaa commentedon Nov 5, 2024
got a pr up here https://github.com/Expensify/Web-Expensify/pull/44298
melvin-bot commentedon Nov 13, 2024
@garrettmknight, @bondydaa, @jjcoffee Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Nov 15, 2024
@garrettmknight, @bondydaa, @jjcoffee Huh... This is 4 days overdue. Who can take care of this?
garrettmknight commentedon Nov 15, 2024
Will test on Monday.
melvin-bot commentedon Nov 16, 2024
@garrettmknight @jjcoffee this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Nov 16, 2024
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
garrettmknight commentedon Nov 18, 2024
Fixed - no payments here.