Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/libs/API/parameters/CreateAppReportParams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
type CreateAppReportParams = {
reportName: string;
// Pass reportName only if it's a custom user defined name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NAB: We should remove this param entirely because it's never used. We don't allow you to specify the name when calling this function, it always uses the default or the name according to the formula.

reportName?: string;
policyID?: string;
type: string;
reportID: string;
Expand Down
3 changes: 1 addition & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3050,7 +3050,7 @@ function createNewReport(
const reportActionID = rand64();
const reportPreviewReportActionID = rand64();

const {optimisticReportName, parentReportID, reportPreviewAction, optimisticData, successData, failureData, optimisticReportData} = buildNewReportOptimisticData(
const {parentReportID, reportPreviewAction, optimisticData, successData, failureData, optimisticReportData} = buildNewReportOptimisticData(
policy,
optimisticReportID,
reportActionID,
Expand All @@ -3067,7 +3067,6 @@ function createNewReport(
API.write(
WRITE_COMMANDS.CREATE_APP_REPORT,
{
reportName: optimisticReportName,
type: CONST.REPORT.TYPE.EXPENSE,
policyID,
reportID: optimisticReportID,
Expand Down