Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export all if all issues are in 'Draft' state #1293

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

caitmich
Copy link
Contributor

@caitmich caitmich commented Sep 11, 2024

Summary

Users have said that they'd like the option to deactivate QA functionality altogether, because some teams don't use it and it has added extra clicks on export.

We need a way to keep the current flow for current teams who use QA, but improve the experience for teams that don't

Proposed solution

Detect in Export#index if all issues & content blocks in the project are in 'Draft' state. If they are, we can assume QA is NOT in use. If there are any 'ready for review' or 'published' records, then it's fair to assume QA IS in use.

If QA is not in use, auto-select "export all" and auto-update the button text to make it clear that all findings are being exported, saving users the extra click.

I assign all rights, including copyright, to any future Dradis
work by myself to Security Roots.

Check List

  • Added a CHANGELOG entry

Comment on lines 13 to 14
issue_states = current_project.issues.pluck(:state).uniq
(issue_states & NON_DRAFT_STATES).any? || non_draft_records_pro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just check with:

Issue.published.or(Issue.ready_for_review).any?

this way, we don't have to fetch all issue states and iterate through each

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants