# Bug NEX-633 - [Backport to 2.11] GET /user_status/api/v1/statuses/OpenProject%20Admin returns 404 during Work Package search

Project: Stream Nextcloud app "OpenProject Integration"
Status: closed
URL: https://community.openproject.org/work_packages/NEX-633

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | Nextcloud Integration 2.11.4 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Nabin Ale |
| Designer |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  In `Nextcloud`, setup `integration_openproject` with `OAuth`.

2.  Connect the `Nextcloud` admin with an `OpenProject` admin.

3.  In `OpenProject`, navigate to  `Project settings > Files` of the `Demo Project` and add a file storage of type `Nextcloud`.

4.  In `Nextcloud`, select a file and navigate to sidebar `OpenProject` tab.

5.  Open the browser inspect and go to network.

6.  In `Nextcloud`, Search for any of the work packages in the `Demo Project`.

### What is the buggy behavior?

  - In the network, when searching for a work package from the sidebar `OpenProject` tab in `Nextcloud`, the browser sends a `GET` request to  [`https://nextcloud.local/ocs/v2.php/apps/user_status/api/v1/statuses/OpenProject%20Admin`](https://nextcloud.local/ocs/v2.php/apps/user_status/api/v1/statuses/OpenProject%20Admin) and the request returns a `404` response.
    
    <br>

    Request:

<!-- end list -->

``` bash
GET https://nextcloud.local/ocs/v2.php/apps/user_status/api/v1/statuses/OpenProject%20Admin  
```

  - Response:

<!-- end list -->

``` json
  {
    "ocs": {
      "meta": {
        "status": "failure",
        "statuscode": 404,
        "message": "No status for the requested userId"
      },
      "data": []
    }
  }
```

### What is the expected behavior?

  - `404` error should not be seen

### Environment information

integration\_openproject `3.1.0` , `2.11.2`  
nextcloud `34`, `32`

**OpenProject installation type**

  - Docker-compose installation

**OpenProject version**

*If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.1.5*

<br>

### **Notes for QA:**

This fix needs to be tested on Nextcloud 32, 31, and 30.

<br>

**Browser**

- [x] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [ ] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [x] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
