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-2418: Show Edit URL edits in entity edit histories #1721

Merged
merged 3 commits into from
Aug 11, 2021

Conversation

reosarevok
Copy link
Member

Implement MBS-2418

This should make it so that the edits show for every entity linked to a specific URL being edited.

We don't look at URL-URL relationships, since they don't exist as a concept at the moment at all.

I think I don't need to check direction here, but I might be wrong?

Let's make sure this won't accidentally link a ton of stuff like last time, but the general idea seems like it just makes sense IMO.

@reosarevok reosarevok added the New feature Non urgent new stuff label Oct 1, 2020
@mwiencek
Copy link
Member

I think I don't need to check direction here, but I might be wrong?

What you have works, but it might make generating the hash ref a bit easier.

for my $rel (@relationships) {
    my $target_type = $rel->target_type;
    my $target_id = $rel->direction == 1 ? $rel->entity1_id : $rel->entity0_id;
    push @{ $related_entities->{$target_type} //= [] }, $target_id;
}

@reosarevok
Copy link
Member Author

Made that change (it does require passing the URL IDs separately), added a test.

@mwiencek mwiencek force-pushed the MBS-2418 branch 2 times, most recently from 6497639 to 4af0b9a Compare June 6, 2021 22:06
This should make it so that the edits show for every entity
linked to a specific URL being edited.
@reosarevok
Copy link
Member Author

@brainzbot, retest this please

3 similar comments
@reosarevok
Copy link
Member Author

@brainzbot, retest this please

@reosarevok
Copy link
Member Author

@brainzbot, retest this please

@reosarevok
Copy link
Member Author

@brainzbot, retest this please

@reosarevok
Copy link
Member Author

@brainzbot, retest this please

@reosarevok reosarevok merged commit 788c862 into metabrainz:master Aug 11, 2021
@reosarevok reosarevok deleted the MBS-2418 branch August 11, 2021 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature Non urgent new stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants