# Get entry in moderation Draft

**URL:** <https://discourse.getcockpit.com/t/get-entry-in-moderation-draft/1552>\
**Category:** Uncategorized\
**Created:** [July 15, 2020, 8:53am UTC](https://discourse.getcockpit.com/t/get-entry-in-moderation-draft/1552 "2020-07-15T08:53:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro92](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@alessandro92](https://discourse.getcockpit.com/u/alessandro92)\
**Post date:** [July 15, 2020, 8:53am UTC](https://discourse.getcockpit.com/t/get-entry-in-moderation-draft/1552/1 "2020-07-15T08:53:36Z")

</div>

Hi everyone,  
I’m trying to create a filter for moderation equal to Draft.  
It doesn’t seem to work in any way, it always recovers the entry with published = published (perhaps from the first revision).

```
    $project = cockpit('collections')->find('projects_custom_preview', [
      'filter' => [
        'previewId' => $_GET['previewId'],
        'permalink' => $_GET['permalink'],
        'published' => 'Draft',
      ]
    ]);

```

Example:  
I added an entry in the collection:  
previewId = 123  
permalink = test  
title = title test  
Except in public mode, I later change the title to test 2 title.  
In the database it is correct with draft mode and title test 2 title but the above query always shows me the data with title equal to test title.

I need help @raffaelj @pauloamgomes

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [July 17, 2020, 6:07pm UTC](https://discourse.getcockpit.com/t/get-entry-in-moderation-draft/1552/2 "2020-07-17T18:07:08Z")

</div>

Sorry, but I never used the Moderation addon. I always use the published field as a boolean value, so it doesn’t fit into my workflow.

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [July 23, 2020, 9:17pm UTC](https://discourse.getcockpit.com/t/get-entry-in-moderation-draft/1552/3 "2020-07-23T21:17:38Z")

</div>

Hi @alessandro92, please fill an issue on the addon repo to investigate further.  
However looking to your example, not sure if that fits in the purpose of the moderation, since it should retrieve only published entries, to get drafts you need a previewToken param (at least when using rest api)
