Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40434

Pagination for branches and ATH coverage

    Details

    • Sprint:
      frank
    • Similar Issues:

      Description

      Paging currently has some problems.

      1) broken on activity (PR has been merged, see below)
      2) Branches hides show more button erroneously

      In Scope

      • Write an ATH for branches and activity pagination
      • Fix the bug with activity button: ttps://github.com/jenkinsci/blueocean-plugin/pull/658
      • Fix branches
      • Remove fetchMore and test case if it isn't needed (from smart-fetch.js) - is smart-fetch.js actually used now? confirm with test coverage

      Steps to reproduce broken pagination on activity

      1. Go to https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity/
      2. Click show more

      Console error

      Uncaught TypeError: _this2.pager.fetchMore is not a function
          at onClick (https://ci.blueocean.io/adjuncts/8c0ace04/org/jenkins/ui/jsmodules/blueocean-dashboard/jenkins-js-extension.js:31655:53)
          at Object.invokeGuardedCallback (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:85069:12)
          at executeDispatch (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:77193:21)
          at Object.executeDispatchesInOrder (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:77216:5)
          at executeDispatchesAndRelease (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:76670:22)
          at executeDispatchesAndReleaseTopLevel (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:76681:10)
          at Array.forEach (native)
          at forEachAccumulated (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:91338:9)
          at Object.processEventQueue (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:76857:7)
          at runEventQueueInBatch (https://ci.blueocean.io/adjuncts/8c0ace04/io/jenkins/blueocean/blueocean.js:85127:18)
      

      cc Ivan Meredith

        Attachments

          Activity

          Hide
          michaelneale Michael Neale added a comment -

          Pull request: https://github.com/jenkinsci/blueocean-plugin/pull/658 for fix

          no ATH yet - but ATH for pagination is well worth it IMO

          Show
          michaelneale Michael Neale added a comment - Pull request: https://github.com/jenkinsci/blueocean-plugin/pull/658 for fix no ATH yet - but ATH for pagination is well worth it IMO
          Hide
          michaelneale Michael Neale added a comment - - edited

          Ivan Meredith as this touches on some new code - are you able to take a look, mostly around testing, and then seeing if we can chop that old "fetchMore()" function, as it is confusing that it is in there now iwth mobx, I think, and we should be able to get rid of it if we can.

          I can see it is used elsewhere in smartfetch in paginate - but it isn't clear if that paginate function is now really used anywhere (it is in actions.js as fetchAllPipelines(), and getAllPipelines() - but then that doesn't seem to be used).

          Can we please add an ATH for pagination, and THEN (only then) look at chopping this really confusing code, if it isn't needed?

          Show
          michaelneale Michael Neale added a comment - - edited Ivan Meredith as this touches on some new code - are you able to take a look, mostly around testing, and then seeing if we can chop that old "fetchMore()" function, as it is confusing that it is in there now iwth mobx, I think, and we should be able to get rid of it if we can. I can see it is used elsewhere in smartfetch in paginate - but it isn't clear if that paginate function is now really used anywhere (it is in actions.js as fetchAllPipelines(), and getAllPipelines() - but then that doesn't seem to be used). Can we please add an ATH for pagination, and THEN (only then) look at chopping this really confusing code, if it isn't needed?
          Hide
          michaelneale Michael Neale added a comment -

          I believe this one was done some time ago. 

          Show
          michaelneale Michael Neale added a comment - I believe this one was done some time ago. 

            People

            • Assignee:
              imeredith Ivan Meredith
              Reporter:
              jamesdumay James Dumay
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: