Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting Date-Time Query Issues #590

Closed
6 of 16 tasks
SureshKumarToverto opened this issue Mar 20, 2024 · 2 comments
Closed
6 of 16 tasks

Troubleshooting Date-Time Query Issues #590

SureshKumarToverto opened this issue Mar 20, 2024 · 2 comments
Labels
bug/fix Something isn't working duplicate This issue or pull request already exists needs: triage package: firestore platform: android Android platform platform: ios iOS platform

Comments

@SureshKumarToverto
Copy link

SureshKumarToverto commented Mar 20, 2024

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

Latest

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Got empty array

  • userList = []

Expected behavior

We array of value

 userList = [{"LoggedinAt":"Timestamp(seconds=1675166136, nanoseconds=561000000)","DisplayName":"Test","CreatedOn":"Timestamp(seconds=1701674105, nanoseconds=723000000)"}]

Reproduction

https://github.com/capawesome-team/capacitor-firebase/tree/main/packages/firestore

Steps to reproduce

public GetAllCheckInUser(filterData): any {
    var date =  moment(new Date()).subtract(1, 'h').toDate();
    console.log('date',date);    
    return from(FirebaseFirestore.getCollection({
      reference: 'LoggedinUser',
      compositeFilter: {
        type: 'and',
        queryConstraints: [         
          {
            type: 'where',
            fieldPath: 'LoggedinAt',
            opStr: '>',
            value: date,
          },
        ],
      },
    }))
      .pipe(
        map((actions) => actions.snapshots.map(a => {    
          const data = a.data as any;
          const id = a.id;
          return { id, ...data };
        })),
        map((data: any) => {
          return _.filter(data, (item) => item.AccountNumber !== null);
        })
      );
  }

Other information

FYI : In Firebase we have value like

image

Capacitor doctor

ionic cap build android --prod

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@robingenz
Copy link
Member

Which plugin version do you use?

@robingenz
Copy link
Member

I close this issue as duplicate of #474.

@robingenz robingenz closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@robingenz robingenz added the duplicate This issue or pull request already exists label Mar 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/fix Something isn't working duplicate This issue or pull request already exists needs: triage package: firestore platform: android Android platform platform: ios iOS platform
Projects
None yet
Development

No branches or pull requests

2 participants