# Approving action request does nothing

**URL:** <https://community.forestadmin.com/t/approving-action-request-does-nothing/1679>\
**Category:** Help me!\
**Created:** [January 20, 2021, 9:07pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679 "2021-01-20T21:07:28Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [January 20, 2021, 9:07pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/1 "2021-01-20T21:07:28Z")

</div>

## Expected behavior

We would expect that when an eligible approver selects “Approve” for the request, the request would be moved to the “History” tab and out of the “To Review” tab. We would also expect that the updates contained in the action would apply once the request is approved.

## Actual behavior

Selecting “Approve” on the request does nothing. It does not get cleared from the “To Review” tab and the updates contained in the action do not get made. However - clicking “Reject” on the request does in fact clear it, but when we tried to make the necessary update in the action afterwards, we faced the same issue with the request not getting approved.

## Failure Logs

There are no errors or logging messages.

## Context

```
"forest-express": "^7.5.0",
"forest-express-sequelize": "^6.3.13",
"sequelize": "^4.44.3",
```

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [January 21, 2021, 9:04am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/2 "2021-01-21T09:04:32Z")

</div>

Hi @rwinz, and welcome to our community

I’m currently investigating this, but I’m currently not able to reproduce this issue.  
Would you mind sharing your project name so I can check what’s happening on our end?  
Also, do you have any error toastr/in the network tabs of your browser console ?

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [January 21, 2021, 10:47pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/3 "2021-01-21T22:47:23Z")

</div>

Thanks for your help @anon39848301!

I have also learned that our other teams are experiencing this issue as well.

We have checked the browser console as you suggested, and here is what we found:

Request URL: [https://api.forestadmin.com/api/custom-actions/1209662-Update%40%40%40Institution](https://api.forestadmin.com/api/custom-actions/1209662-Update%40%40%40Institution)  
Request Method: GET  
Status Code: 404 Not Found

Response:

Error
```
Cannot GET /api/custom-actions/1209662-Update%40%40%40Institution
```

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [January 22, 2021, 10:03am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/4 "2021-01-22T10:03:08Z")

</div>

Hello @rwinz ,

Could you share with us how you defined your smart action please?  
More information like your project name could help us too 🙂

Do you know when this error appears in the console (when you approve it? when you load the page? …)  
Does the “Update institution” action still exist on your collection?

Let me know 🙂

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [February 5, 2021, 12:21am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/5 "2021-02-05T00:21:38Z")

</div>

Hi @Guillaume_Cisco ! Thanks for your help and sorry for the delay.

The project name is `woodpecker`. The error that I detailed in my last post appears when trying to approve the request. And yes, the “Update Institution” action still exists on the collection.

Here is how we are defining our Update Institution action:

A snapshot from forest/institutions.js:

```javascript
Liana.collection('Institution', {
      searchFields: ['id', 'name'],
      actions: [
        {
        name: 'Update Institution',
        endpoint: '/forest/actions/update-institution',
        type: 'single',
        fields: {
            field: 'id',
            type: 'Number',
            isRequired: true
            },
            {
             field: 'name',
             type: 'String',
             isRequired: true,
             },
        values: getValuesUpdateInstitution,
      }]
});
  

```

where getValuesUpdateInstitution() gets the institution given the context.  
This action is working as expected except for when trying to approve the request.

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [February 5, 2021, 9:38am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/6 "2021-02-05T09:38:02Z")

</div>

Hi @rwinz,

I am wondering how this call to `https://api.forestadmin.com/api/custom-actions/...` can be done as there is no such route on the Forest Admin API.

> [@rwinz](#):
>
> have also learned that our other teams are experiencing this issue as well.
> 
> We have checked the browser console as you suggested, and here is what we found:
> 
> Request URL: [https://api.forestadmin.com/api/custom-actions/1209662-Update%40%40%40Institution](https://api.forestadmin.com/api/custom-actions/1209662-Update%40%40%40Institution)  
> Request Method: GET  
> Status Code: 404 Not Found

Could you share a screencast of your browser, with the network tab of your developer console opened, while trying to approve an approval request?  
It would help a lot to understand what is happening here.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 10, 2021, 3:22pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/8 "2021-02-10T15:22:26Z")

</div>

Hi @rwinz,

Your issue appears to be very strange! Let’s try to finally find where it comes from.

To sum up:

- This action exists for a while
- It always works when not used with the approval flow
- It always works when used with the approval flow if the same user self approve its request
- It never works when used with the approval flow if a user tries to approve someone else request
- This problem occurs only for this specific action  
Am I correct?

I’ve tried to reproduce your error with the same settings for my action but no luck.  
It’s pretty hard to tell where it could come from.

Sorry but would you mind to share your network again (in the failing scenario), and clean everything before your final click on “approve”. It should look like something like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/d2ebe7238febdb2bf05857f9a09d51612ba9b958.png)

From this, hopefully we will be able to understand what call is missing / wrong and identify your problem.

Side note: it is something possible for you and your team at some point to remove this action and put it live back again and see if the problem persists?

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [February 11, 2021, 9:46am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/10 "2021-02-11T09:46:57Z")

</div>

Hello @rwinz,

Can you share with us the following info?

- The content of the **response** of the query on `/action-approval/:id`? In your screenshot we only see the headers, and I would like to know the actual JSON sent by the server
- In the same way, you’ll find calls when loading an environment, on `https://api.forestadmin.com/api/renderings/[yourProject]/[yourEnv]/[yourTeam]`, and I would like to know the extract of the received json:
  - I would like to know the content of an object in the `included` property, corresponding to your custom action.

I suspect that there is a mismatch between the two ids, that leads to your error. Can you find this info and share them with us?

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [February 12, 2021, 11:49pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/11 "2021-02-12T23:49:57Z")

</div>

It looks like you are correct, the id’s do not seem to match.

Here is the contents of the object in the `included` array that corresponds to our custom action ‘Update Institution’:

```javascript
{
      type: "customActions",
      id: "1525461-Update@@@Institution",
      attributes: {
        allow_self_approval: true,
        base_url: null,
        confirmation: false,
        download: false,
        endpoint: "/forest/actions/update-institution",
        hooks: { load: false, change: [] },
        http_method: "POST",
        is_hidden: false,
        name: "Update Institution",
        position: 5,
        redirect: false,
        require_approval: true,
        type: "single",
        restricted_to: { roles: [], users: [] },
        approved_by: { roles: [203], users: [] },
      },

```

And here is the screenshot of the response to [https://api.forestadmin.com/api/action-approvals/37411](https://api.forestadmin.com/api/action-approvals/37411)

 ![Screen Shot 2021-02-12 at 4.40.26 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/7/78cb785af496568278b4442af54e008353af6c1a.png)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [February 15, 2021, 10:31am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/12 "2021-02-15T10:31:58Z")

</div>

Hi 👋 @rwinz can you give me the name of your project, the team and the environment on which you experienced the issue?

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [February 16, 2021, 5:47pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/13 "2021-02-16T17:47:11Z")

</div>

Project name: woodpecker  
Environment: Production  
Team: IE - Administrators

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [February 17, 2021, 11:44am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/14 "2021-02-17T11:44:39Z")

</div>

Hi @rwinz,

I’m not able to locate this action in the `IE - Administrators` `Production` environment. Did you reset this smart action?

Did you try the @anon34731316 solution?

> it is something possible for you and your team at some point to remove this action and put it live back again and see if the problem persists?

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [February 18, 2021, 12:23am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/15 "2021-02-18T00:23:05Z")

</div>

The action is called ‘Update Institution’ on the Institutions collection – I am seeing it on the production environment while I am on the IE - Administrators team.

We are not able to try that solution because we would have to release without the action and then wait until another release window before we are able to put it back.

This is the url that I used in order to get the action object from the included array, as suggested in a another post:

`https://api.forestadmin.com/api/renderings/woodpecker/Production/IE%20-%20Administrators`

Gives:

```javascript
{
      type: "customActions",
      id: "1525461-Update@@@Institution",
      attributes: {
        allow_self_approval: true,
        base_url: null,
        confirmation: false,
        download: false,
        endpoint: "/forest/actions/update-institution",
        hooks: { load: false, change: [] },
        http_method: "POST",
        is_hidden: false,
        name: "Update Institution",
        position: 5,
        redirect: false,
        require_approval: true,
        type: "single",
        restricted_to: { roles: [], users: [] },
        approved_by: { roles: [203], users: [] },
      },

```

> [@GuillaumeGautreau](#):
>
> In the same way, you’ll find calls when loading an environment, on `https://api.forestadmin.com/api/renderings/[yourProject]/[yourEnv]/[yourTeam]` , and I would like to know the extract of the received json:
> 
> - I would like to know the content of an object in the `included` property, corresponding to your custom action.

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [February 18, 2021, 2:53pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/16 "2021-02-18T14:53:57Z")

</div>

Hi,

What a long topic ☹ is the issue still appear?

To sum up the situation:

- Your rendering **woodpecker/Production/IE%20-%20Administrators** contains the custom action: **1525461-Update@@@Institution**.
- On the UI, you browse the rendering **woodpecker/Production/IE%20-%20Administrators** then visit the action approval screen.
- When approving an action, the **action-approval 37411** is fetched, and relates to smartAction **1209662-Update@@@Institution**

This smart action seems to point to **a bad smart action**. An error is raised because of this, and the process fail.

This leads us to think the action approval state is broken.  
The scenario bringing this is unknown.

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [March 4, 2021, 10:28pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/17 "2021-03-04T22:28:29Z")

</div>

Yes the issue is still occurring, and your summation is correct.

Do you have any suggestions for addressing this on our end?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [March 5, 2021, 10:39am UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/18 "2021-03-05T10:39:50Z")

</div>

Hi @rwinz 👋 I’m able to reproduce.  
The action was launch from another team it’s for what the id is different.  
For explain:

- A user call this action for the team `IE` the action is `1209662-Update@@@Institution`.
- You try to approve from the `IE - Administrator` team the action is `1525461-Update@@@Institution`

Unfortunately it is a bug. You have two solution.

The first is to migrate to the new roles feature by following this: [Migrate to the new role system - Documentation](https://docs.forestadmin.com/documentation/how-tos/maintain/migrate-to-the-new-role-system).  
And after that have a look on this: [Manage roles and permission levels - Documentation](https://docs.forestadmin.com/documentation/reference-guide/teams-and-users/manage-roles) to understand how this feature work.

The second is to approve this action on the `IE` team.

Let me know if that help.

---

<div class="post-metadata">

**Author:** ![rwinz](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@rwinz](https://community.forestadmin.com/u/rwinz)\
**Post date:** [March 5, 2021, 7:00pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/19 "2021-03-05T19:00:05Z")

</div>

That makes sense, thank you for explaining!

Is this a bug that will be fixed on your end, and if so is there an estimate for when it will be done? Or is there not a plan to fix it, but instead the goal is to migrate to the new role system?

---

<div class="post-metadata">

**Author:** ![louis](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louis/32/4_2.png) [@louis](https://community.forestadmin.com/u/louis)\
**Post date:** [March 8, 2021, 4:41pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/20 "2021-03-08T16:41:07Z")

</div>

Hey @rwinz 👋 ,

In addition to fixing this bug, our new Roles system will provide you more security and flexibility with your users’ permissions. So that’s definitely something we could consider in this situation.

The migration is pretty smooth and easy to run.

Would you be available in the following days to give you a quick demo and help you migrate to our new Roles system?

You can choose a convenient date and time in my calendar: [Calendly - Louis Steenbrink](https://calendly.com/louis-steenbrink)

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [April 29, 2021, 3:11pm UTC](https://community.forestadmin.com/t/approving-action-request-does-nothing/1679/21 "2021-04-29T15:11:22Z")

</div>

Hello @rwinz,

You should be able to approve the actions across teams without any issue now.  
Could you try and tell me if everything works fine?

Thanks! 🙏
