Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #1454
Closed
Open
Issue created Sep 06, 2019 by Administrator@rootContributor

getJobs() start and end options are applied per job state

Created by: soulchild

Don't know if this is intended behaviour, but I noticed that when using getJobs() with multiple states, the optional start and end parameters to skip/limit the results seem applied per job state. So, given this:

getJobs(['active', 'completed'], 0, 1)

and having, say 10 active and 10 completed jobs in the queue, the call yields 4 jobs: The first 2 jobs with state active, and the first two jobs with state completed. I'd have expected to just get two results.

If this is indeed intended, I suggest updating the reference manual to point this out, because it took me some time to figure out what's going on there. 😄

Assignee
Assign to
Time tracking