Only include published evidence when export scope is published - #57
Open
caitmich wants to merge 2 commits into
Open
Only include published evidence when export scope is published#57caitmich wants to merge 2 commits into
caitmich wants to merge 2 commits into
Conversation
Open
2 tasks
etdsoft
reviewed
Sep 1, 2026
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.
Summary
Exporter#exportcalledissue.evidencedirectly to build the Evidence rows, bypassing the Published/All export scope thatcontent_service.all_issuesalready respects.We don't want a published-scope export to include Draft/Ready-for-review Evidence in the exported CSV.
content_service.all_evidencelookup, fetched once and grouped byissue_id, instead ofissue.evidence. This avoids re-querying evidence per issue (an N+1) while still only ever surfacing evidence for issues in the exported (already scope-filtered) set.dradis-pluginsgem changes (branchfeature/evidence-content-service-scope) forall_evidence— needs a realdradis-pluginsrelease + Gemfile bump before this merges. See dradis-plugins PR #127.spec/lib/dradis/plugins/csv_export/exporter_spec.rb— no exporter spec previously existed for this gem.Part of the same review-comment follow-up as
qa/add-evidence-review-state(Evidence now has an independent Draft/Ready for review/Published state).Testing Steps
From the Dradis Pro app directory, with this gem checked out at a sibling path, temporarily point the Gemfile at this branch/path and run:
Assert all examples pass, confirming a Published-scope export includes only Published evidence content, and an All-scope export includes both Published and Draft evidence content.
Check List