Problem
As mentioned in this PR comment, when the frontend optimistically computes report names, it should only do so for reports that already have the title field set in the report name value pairs. We will need to modify optimistic report creation in app to copy over the title field from the policy, and also do that for other actions such as changing a report's policy. The reason for this is that the lack of the field is used to signify that the report has been manually renamed, and is used to prevent the name from being recomputed and overriding the manually set name.
Without implementing such logic, the following case will be failing. If report names can be changed, a manually renamed report retains its manual name when the policy report name formula is updated
Solution
Implement the logic in the updateTitleFieldToMatchPolicy function when reports are created or move policies. Check if the title field rNVP exists before optimistically computing report names. cc @sosek108
Issue Owner
Current Issue Owner: @bfitzexpensify
Problem
As mentioned in this PR comment, when the frontend optimistically computes report names, it should only do so for reports that already have the title field set in the report name value pairs. We will need to modify optimistic report creation in app to copy over the title field from the policy, and also do that for other actions such as changing a report's policy. The reason for this is that the lack of the field is used to signify that the report has been manually renamed, and is used to prevent the name from being recomputed and overriding the manually set name.
Without implementing such logic, the following case will be failing. If report names can be changed, a manually renamed report retains its manual name when the policy report name formula is updated
Solution
Implement the logic in the updateTitleFieldToMatchPolicy function when reports are created or move policies. Check if the title field rNVP exists before optimistically computing report names. cc @sosek108
Issue Owner
Current Issue Owner: @bfitzexpensify