# SBDSKTicket.getClosedList returns hasNext always false

**URL:** <https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822>\
**Category:** Sendbird Desk\
**Tags:** desk-sdk, ios\
**Created:** [August 19, 2020, 10:50pm UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822 "2020-08-19T22:50:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![odm](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/odm/32/433_2.png) [@odm](https://community.sendbird.com/u/odm)\
**Post date:** [August 19, 2020, 10:50pm UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822/1 "2020-08-19T22:50:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [August 19, 2020, 10:57pm UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822/2 "2020-08-19T22:57:14Z")

</div>

@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. 🙂

---

<div class="post-metadata">

**Author:** ![odm](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/odm/32/433_2.png) [@odm](https://community.sendbird.com/u/odm)\
**Post date:** [August 19, 2020, 11:00pm UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822/3 "2020-08-19T23:00:06Z")

</div>

@Supertopoz Just doing this call below with offset = 0

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

```

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [August 20, 2020, 12:30am UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822/4 "2020-08-20T00:30:21Z")

</div>

@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. 🙂

---

<div class="post-metadata">

**Author:** ![odm](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/odm/32/433_2.png) [@odm](https://community.sendbird.com/u/odm)\
**Post date:** [August 20, 2020, 12:53am UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822/5 "2020-08-20T00:53:28Z")

</div>

No worries, thanks @Jason

---

<div class="post-metadata">

**Author:** ![odm](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/odm/32/433_2.png) [@odm](https://community.sendbird.com/u/odm)\
**Post date:** [June 8, 2021, 6:03pm UTC](https://community.sendbird.com/t/sbdskticket-getclosedlist-returns-hasnext-always-false/822/6 "2021-06-08T18:03:40Z")

</div>

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