Include the request number on the requests table (closes #20262) - #20264
Open
kshivam4781 wants to merge 3 commits into
Open
Include the request number on the requests table (closes #20262)#20264kshivam4781 wants to merge 3 commits into
kshivam4781 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the request number as its own column in the "requests" table shown on project, package, user, and group pages (the shared
_requests_table.html.hamlpartial /bs_requests#indexJSON endpoint used by all four of those controllers).Why
Closes #20262. Package maintainers reviewing the Maintenance workflow (
osc mr) currently have nothing in the table that identifies a request; they have to click "View" to learn the request number. This adds a "#" column with the request number, linked to the request, right before the existing "View" column.Changes
_requests_table.html.haml: add a#header cell.bs_requests/index.json.erb: emit a new cell per row with#<number>linking torequest_show_path.requests_table.js: the new column is non-orderable (like the existing "View" link), so it's added to theorderable: falsetargets alongside the shifted "View" column index (6 -> 7).This only touches the shared partial/JSON view, so the change applies uniformly to the project, package, user ("My Involved Requests"), and group request tables, which all render through the same
webui/shared/bs_requests/indexview.Testing
I don't have a working OBS docker dev environment set up, so I wasn't able to run the RSpec/Capybara suite for this change. I did:
Webui::Projects::BsRequestsController,Webui::Packages::BsRequestsController,Webui::Users::BsRequestsController,Webui::Groups::BsRequestsController) to confirm they share the same_requests_table.html.hamlpartial andbs_requests/index.json.erbview, so one change covers all of them consistently.a_bs_requests_data_table_controller.rb's shared examples, andpackages_spec.rb's Capybara test) — the new column is appended after the existing sortable columns (created/source/target/requester/type/priority stay at indices 0-5) and given no CSS class, so the existing hardcodedorder: {column: 5}(priority) /column: 2(composite target) assertions and thefind('a', class: 'request_link')Capybara lookup for the "View" link are unaffected.ERB.new(...).src+RubyVM::InstructionSequence.compile) and the JS file (node --check); manually reviewed the one-line HAML addition.Happy to run the full suite and fix anything it turns up if a maintainer can point me at a lighter-weight way to get the specs running, or I can try to get the docker compose setup working in a follow-up.