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

MBS-12839: Allow searching for edits by kind of edit type #2814

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

reosarevok
Copy link
Member

@reosarevok reosarevok commented Jan 25, 2023

Implement MBS-12839

Problem

Right now, if you want to select all merge edits (for example) in an edit search, you need to select the types one by one, which is a pain in the ass, especially with the multiselect UI.

A secondary issue that is not yet solved by this, but probably needs this as part of a solution: it's not currently possible to search for many specific historic edit types because they have been lumped (based on name) with, say, "Edit release". Ideally, we would have a way to search for edits that do an edit action to a release entity (mostly the current "Edit release" lump) and for every edit type, historic or not, separately.

Solution

This adds a new edit search option, "Edit kind", using the edit kinds already set on edit packages. As such, the edits are split into five options: add, edit, merge, other and remove. I made them translatable (with an 'edit kind' context) since they will now be user-facing.

Testing

Ran a bunch of searches for open edits of all different edit kinds. Did not check that I agree all the currently set kinds make sense, FWIW - I'm just trusting them at the moment.

Actions

@reosarevok reosarevok force-pushed the MBS-12839 branch 3 times, most recently from 591d412 to a36c51d Compare December 1, 2023 20:51
@mwiencek
Copy link
Member

mwiencek commented Dec 1, 2023

Shouldn't we be determining the edit types on the server, so that if we extend which types of edits are included in a "kind," then any link to a search for that kind will include the new types in the future?

Edit: Perhaps extend Predicate::Set and override sql_arguments to convert the list of kind names to edit type IDs. Maybe you can remove the field_name check in Predicate::Set that way too?

@reosarevok reosarevok force-pushed the MBS-12839 branch 2 times, most recently from ce5ca36 to a9d2a91 Compare December 8, 2023 08:19
We want to use this as an edit search option, but for that
the options should really be translatable.
Rather than having to select all add / merge / whatnot edits
one by one by type, this allows us to search for all types of merges
or whatnot in one quick click.

This will also eventually help us to split the lumped
historic relationships that all share the same edit name,
since instead of needing to use a grouped "Edit release" name,
we will be able to select "kind is edit, entity type is release".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Edit search New feature Non urgent new stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants