SBDSKTicket.getClosedList returns hasNext always false

Hello,

I’m working in implementing a paginated list of closed tickets. There are some users that I know for sure they have more than 10 closed tickets but when using SBDSKTicket.getClosedList to fetch the closed tickets the hasNext flag is always false (like if there were no more closed tickets to load).

I used the amount of results returned to know if I have hit the last page by now by checking if tickets.count == maxItemsPerPage. This solution will make to have to do an additional call when I hit the last page, so this is not ideal just a workaround.

Any idea why this would happen? or is it an SDK bug?

Thanks,

Oscar

@odm Please can you share the code you are using to fetch and paginate the closed tickets? This will help to trouble shoot your issue. :slight_smile:

@Supertopoz Just doing this call below with offset = 0

SBDSKTicket.getClosedList(withOffset: offset) { (tickets, hasNext, error) in
    DispatchQueue.main.async {
        completion(tickets, hasNext, error)
    }
}

@odm I took a look at the iOS Desk SDK and at first glance it seems something is not right about hasNext . Please give me some time and I will find out why it doesn’t work. :slight_smile:

No worries, thanks @Jason

Hey @Jason it seems it’s still not working :frowning: any update on that?