# Bug OP-19478 - Export: Queries accessed within another project cannot be exported

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-19478

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Export / PDF Export, Modules and project features / Work packages |
| Target versions | 17.8.0 |
| Observed in versions | 17.5.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.5.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Andrej Sandorf |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Open work package list [📅 Roadmap | Work Packages | OpenProject | OpenProject Community](https://community.openproject.org/projects/openproject/work_packages?query_id=6777).
    
    1.  This is the one people get when clicking "Learn more" on our roadmap page in the "Jira migration" section

2.  On the top right corner, click three dots button to open the menu and click "Export"

The error occurs because the query belongs to project 1509 (Stream Jira to OpenProject data Migrator), not 14 (OpenProject).

  - <https://community.openproject.org/projects/OP/work_packages?query_id=6777> =\> export fails

  - <https://community.openproject.org/projects/JIM/work_packages?query_id=6777> =\> export works

### What is the buggy behavior?

  - An error occurs

  - The export dialog does not open

  - The devtools console shows an unhandled 404 error

### What is the expected behavior?

1.  No error, export modal is shown and allows to export, the same way the work package list allows to see the query.

2.  BTW, this only occurs for this very query. For others it's ok.

### **Logs**

Browser logs:

``` text
XHR GET https://community.openproject.org/projects/openproject/work_packages/export_dialog?columns[]=id&columns[]=subject&columns[]=type&columns[]=status&columns[]=assignee&columns[]=version&showSums=false&timelineVisible=false&highlightingMode=inline&highlightedAttributes[]=/api/v3/queries/columns/status&highlightedAttributes[]=/api/v3/queries/columns/priority&highlightedAttributes[]=/api/v3/queries/columns/dueDate&includeSubprojects=true&showHierarchies=false&groupBy=customField339&filters=[{"status":{"operator":"!","values":["6"]}},{"project":{"operator":"=","values":["14","1509"]}},{"type":{"operator":"=","values":["8","6"]}},{"customField338":{"operator":"=","values":["961","982"]}}]&sortBy=[["manualSorting","asc"]]&timestamps=PT0S&title=📅 Roadmap&query_id=6777
[HTTP/2 404  65ms]

Uncaught (in promise) Error: 
    request turbo-requests.service.ts:59
    promise callback*request turbo-requests.service.ts:49
    requestStream turbo-requests.service.ts:111
    onClick op-settings-dropdown-menu.directive.ts:326
    handleClick op-context-menu.component.ts:34
    OPContextMenuComponent_For_3_Conditional_2_Conditional_2_Template_button_click_0_listener op-context-menu.html:56
    Angular 9
    OPContextMenuComponent_For_3_Conditional_2_Conditional_2_Template op-context-menu.html:56
    Angular 4
    OPContextMenuComponent_For_3_Conditional_2_Template op-context-menu.html:47
    Angular 18
```

### Analysis

The error occurs because the query belongs to project 1509 (Stream Jira to OpenProject data Migrator), not 14 (OpenProject).

  - <https://community.openproject.org/projects/OP/work_packages?query_id=6777> =\> export fails

  - <https://community.openproject.org/projects/JIM/work_packages?query_id=6777> =\> export works

Here is the Query 6777 data:

``` text
#<Query:0x00007fe81ee1fd08
 id: 6777,
 project_id: 1509,
 name: "📅 Roadmap",
 filters: [...],
 user_id: 87,
 public: true,
 column_names: [:id, :subject, :type, :status, :assigned_to, :version],
 sort_criteria: [["manual_sorting", "asc"]],
 group_by: "cf_339",
 display_sums: false,
 timeline_visible: false,
 show_hierarchies: false,
 timeline_zoom_level: "auto",
 timeline_labels: {},
 highlighting_mode: "inline",
 highlighted_attributes: [:status, :priority, :due_date],
 created_at: "2025-06-24 07:26:31.643372000 +0000",
 updated_at: "2026-05-13 15:01:57.905603000 +0000",
 display_representation: nil,
 starred: true,
 include_subprojects: true,
 timestamps: ["PT0S"]>
```

### Screenshots and other files

The link to the work package list having this issue

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921795/content">

The error occurring:

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921794/content">

### Environment information

**OpenProject installation type**

  - Hosted cloud edition
    
      - community.openproject.org

**OpenProject version**

<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><thead class="op-uc-table--head"><tr class="op-uc-table--row"><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Name</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Version</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Tag</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Updated on</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Core version</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">SaaS version</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">community.openproject.org</p></td><td class="op-uc-table--cell"><p class="op-uc-p">17.5.0</p></td><td class="op-uc-table--cell"><p class="op-uc-p">saas-2026.06.05-14h04m13s-release-17.5-a6265b5</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Fri, 05 Jun 2026 13:52:14 GMT</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><a class="op-uc-link" href="https://github.com/opf/openproject/commit/a6265b54f98d6dea3f719a7871ad8e9f708d1ae0">a6265b54f98d</a></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><a class="op-uc-link" href="https://github.com/opf/saas-openproject/commit/34fcb1b5f083b20e4429be79e885fbda50f81f9c">34fcb1b5f083</a></p></td></tr></tbody></table></figure>

**Browser**

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

**Operating System**

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

**Language**

English
