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

Feature issue entry association diff #1289

Open
wants to merge 9 commits into
base: feature/issue-entry-association
Choose a base branch
from

Conversation

aapomm
Copy link
Contributor

@aapomm aapomm commented Sep 3, 2024

Summary

  • Backported CSS changes from Pro
  • Hide IssueLib widget
  • Implement DiffedContent and specs
  • Add delete_field method for the HasFields concern
  • Implement fields_has_to_source to convert the hash of fields to Dradis-style item content.

Check List

- [ ] Added a CHANGELOG entry

app/models/concerns/has_fields.rb Show resolved Hide resolved
app/models/concerns/has_fields.rb Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

I don't recall having reviewed this class before but several questions come to mind.

  1. ".source_to_fields" and ".source_to_fields_array" sound a lot like one should be colling the other, instead you're duplicating code.
  2. what's parse_fieldless_string used for?

I first noticed the use of "source" which I wasn't a fan of, but fine, it's our own internal speak. But then in the last method you use "_string" instead of "_source" and I don't that works (arguably I don't understand that method either).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

".source_to_fields" and ".source_to_fields_array" sound a lot like one should be colling the other, instead you're duplicating code.

Fixed ✅

what's parse_fieldless_string used for?

This method handles strings that are out side the Dradis fields format (#[Field]#\nValue\n...). This method solves the problem: if I have the following content in an issue

asdf

#[Title]#
Issue#1

How will asdf appear when the user switches to the Fields view?

I first noticed the use of "source" which I wasn't a fan of, but fine, it's our own internal speak. But then in the last method you use "_string" instead of "_source" and I don't that works (arguably I don't understand that method either).

I've renamed the method to parse_fields_without_headers(source) to better describe the method.

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.

3 participants