Skip to content

[Due for payment 2025-06-24] Tags - Unable to import multi tags on Android and iOS #63617

Closed

Description

@mitarachim

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.1.60-1
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught during regression testing, add the test name, ID and link from TestRail: #62467
Email or phone of affected tester (no customers): applausetester+040621kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Samsung Galaxy Z Fold 4 / Android 15
App Component: Workspace Settings

Action Performed:

  1. Launch Expensify app.
  2. Create a new workspace.
  3. Go to workspace settings > More features.
  4. Enable Tags.
  5. Go to Tags.
  6. Tap More > Import spreadsheet.
  7. Tap Multi level tags.
  8. Upgrade the workspace.
  9. Tap Multi level tags.
  10. Upload a multi tag csv file.
  11. Unselect These are independent tags.
  12. Tap Import.
  13. Tap Got it.

Expected Result:

The multi tags will be imported.

Actual Result:

The multi tags are not imported. Tag list is empty.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6851944_1749162871584.Screen_Recording_20250606_062643_Expensify.mp4

Bug6851944_1749162871595!Dependent_-_Multi_Level_tags_NEW.csv

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @stephanieelliott

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    DeployBlocker
    on Jun 6, 2025
  2. melvin-bot commented on Jun 6, 2025

    @melvin-bot

    Triggered auto assignment to @stephanieelliott (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.

  3. melvin-bot commented on Jun 6, 2025

    @melvin-bot

    Triggered auto assignment to @MonilBhavsar (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Jun 6, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 6, 2025

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. BlameGPT commented on Jun 6, 2025

    @BlameGPT
    Contributor

    Possible culprit PRs for this issue

  7. drminh2807 commented on Jun 6, 2025

    @drminh2807
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Tags - Unable to import multi tags on Android and iOS

    What is the root cause of that problem?

    We are sending the file the wrong way.

    fetch(spreadsheet?.fileURI ?? '').then((res) => {
    if (!res.ok && Platform.OS !== 'android') {
    throw Error(res.statusText);
    }
    res.blob().then((blob) => {
    const file = new File([blob], 'testFile.csv', {type: blob.type || 'text/csv'});

    Native file require uri

    function isFileUploadable(file: FileObject | undefined): boolean {
    // Native platforms only require the object to include the `uri` property.
    // Optionally, it can also have a `name` and `type` properties.
    // On other platforms, the file must be an instance of `Blob` or one of its subclasses.
    return !!file && 'uri' in file && !!file.uri && typeof file.uri === 'string';
    }

    What changes do you think we should make in order to solve the problem?

    We already have ulti to do that, so just resuse it

    res.blob()
    .then((blob) => {
    // On Android devices, fetching blob for a file with name containing spaces fails to retrieve the type of file.
    // In this case, let us fallback on fileType provided by the caller of this function.
    const file = new File([blob], cleanFileName(fileName), {type: blob.type || fileType});
    file.source = path;
    // For some reason, the File object on iOS does not have a uri property
    // so images aren't uploaded correctly to the backend
    file.uri = path;
    onSuccess(file);
    resolve(file);
    })

        readFileAsync(spreadsheet?.fileURI ?? '', 'testFile.csv', (file) => {
            const parameters: ImportMultiLevelTagsParams = {
                policyID,
                isFirstLineHeader: spreadsheet?.containsHeader,
                isIndependent: spreadsheet?.isImportingIndependentMultiLevelTags,
                isGLAdjacent: spreadsheet?.isGLAdjacent,
                file,
            };
    
            API.write(WRITE_COMMANDS.IMPORT_MULTI_LEVEL_TAGS, parameters, onyxData);
        });

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    What alternative solutions did you explore? (Optional)

    Simple add file uri is spreadsheet uri

    file.uri = spreadsheet?.fileURI ?? ''
  8. 19 remaining items

  9. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Jun 17, 2025
  10. changed the title [-]Tags - Unable to import multi tags on Android and iOS[/-] [+][Due for payment 2025-06-24] Tags - Unable to import multi tags on Android and iOS[/+] on Jun 17, 2025
  11. removed
    Reviewing
    on Jun 17, 2025
  12. melvin-bot commented on Jun 17, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jun 17, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.67-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-06-24. 🎊

    For reference, here are some details about the assignees on this issue:

    • @akinwale requires payment through NewDot Manual Requests
    • @allgandalf requires payment (Needs manual offer from BZ)
  14. melvin-bot commented on Jun 17, 2025

    @melvin-bot

    @akinwale / @allgandalf @stephanieelliott @akinwale / @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. added
    Daily
    and removed
    Weekly
    on Jun 24, 2025
  16. melvin-bot commented on Jun 24, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@stephanieelliott)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. akinwale commented on Jun 24, 2025

    @akinwale
    Contributor

    This is a follow-up issue. No payment required here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions