Skip to content

Commit

Permalink
Changed default values of policyID
Browse files Browse the repository at this point in the history
  • Loading branch information
esh-g committed Sep 21, 2023
1 parent fd324b9 commit cf28be0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2646,12 +2646,12 @@ function buildOptimisticWorkspaceChats(policyID, policyName) {
* @param {String} parentReportID - Report ID of the chat where the Task is.
* @param {String} title - Task title.
* @param {String} description - Task description.
* @param {String | undefined} policyID - PolicyID of the parent report
* @param {String} policyID - PolicyID of the parent report
*
* @returns {Object}
*/

function buildOptimisticTaskReport(ownerAccountID, assigneeAccountID = 0, parentReportID, title, description, policyID = undefined) {
function buildOptimisticTaskReport(ownerAccountID, assigneeAccountID = 0, parentReportID, title, description, policyID = CONST.POLICY.OWNER_EMAIL_FAKE) {
return {
reportID: generateReportID(),
reportName: title,
Expand All @@ -2664,7 +2664,6 @@ function buildOptimisticTaskReport(ownerAccountID, assigneeAccountID = 0, parent
policyID,
stateNum: CONST.REPORT.STATE_NUM.OPEN,
statusNum: CONST.REPORT.STATUS.OPEN,
...(_.isUndefined(policyID) ? {} : {policyID}),
};
}

Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Task.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ function clearOutTaskInfo() {
* @param {String} assigneeEmail
* @param {Number} assigneeAccountID
* @param {Object} assigneeChatReport - The chat report between you and the assignee
* @param {String | undefined} policyID - the policyID of the parent report
* @param {String} policyID - the policyID of the parent report
*/
function createTaskAndNavigate(parentReportID, title, description, assigneeEmail, assigneeAccountID = 0, assigneeChatReport = null, policyID = undefined) {
function createTaskAndNavigate(parentReportID, title, description, assigneeEmail, assigneeAccountID = 0, assigneeChatReport = null, policyID = CONST.POLICY.OWNER_EMAIL_FAKE) {
const optimisticTaskReport = ReportUtils.buildOptimisticTaskReport(currentUserAccountID, assigneeAccountID, parentReportID, title, description, policyID);

const assigneeChatReportID = assigneeChatReport ? assigneeChatReport.reportID : 0;
Expand Down

0 comments on commit cf28be0

Please sign in to comment.