filter updated_before and updated_after in API for Project issues do not work
Summary
As described in this documentation page https://docs.gitlab.com/ee/api/issues.html#list-project-issues there should be a possibility to use updated_before and update_after to constrain the results when listing project issues over the REST API. However - other than with created_after and created_before - this does not work: the API always delivers all the issues in the project.
Steps to reproduce
curl -i --header 'Private-Token: xxxx-xxxx-xxxxxx' 'http://<host>/api/v4/projects/<projectid>/issues?scope=all&per_page=1&modified_after=<YYYY-MM-DD>'
curl -i --header 'Private-Token: xxxx-xxxx-xxxxxx' 'http://<host>/api/v4/projects/<projectid>/issues?scope=all&per_page=1&modified_before=<YYYY-MM-DD>'
This invocation delivers all headers - look for X-Total. Its value will always be the total number of issues in the project - regardless of the date.
Example Project
I am sorry but i can not give an example project as i host all my projects on a private instance.
What is the current bug behavior?
The value returned in header "X-Total" is always the total number of issues in the project - regardless of the date.
What is the expected correct behavior?
The value returned in header "X-Total" should reflect only the number of project issues modified before/after the date given.
Relevant logs and/or screenshots
none
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.5p335 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.1 Go Version: unknownGitLab information Version: 11.5.3-ee Revision: 588b25bf6af Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: http://gitlab.fritz.box HTTP Clone URL: http://gitlab.fritz.box/some-group/some-project.git SSH Clone URL: git@gitlab.fritz.box:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 8.4.1 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 8.4.1 ? ... OK (8.4.1) hooks directories in repos are links: ... 2/1 ... ok 2/2 ... ok 2/3 ... ok 2/4 ... ok 2/5 ... ok 2/6 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 2/2 ... yes 2/3 ... yes 2/4 ... yes 2/5 ... yes 2/6 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.9.5 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 2 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
Possible fixes
Sorry, can't provide none