[request] Userscript to move recording-level relationships to the release-level in the Release Edit Relationships page

Sometimes editors incorrectly add release-level relationships to all the recordings on a release. It would be nice to have a userscript that moves all of the relationships to the release level.

(Alternatively, a userscript to delete all relationships on the recordings.)

(Relationship removals aren’t auto-edits for anybody, so shouldn’t be a huge deal to distribute such a userscript.)

3 Likes

As removals are never auto edit, when I do this manually, I also set related add edits as requiring votes (I’m autoeditor, they would be autoedits, otherwise).

The script should do that, I think, to have a consistent voting queue.

I was actually working on such a script recently to fix a release in my collection that got screwed up in the same way. I wasn’t intending to publish it, as it was just something very hacky that I could paste in the JavaScript console; but seeing as it would be useful for you and maybe others, I cleaned it up and turned it into a proper script:

However, be warned: I haven’t tested it much.

The script just adds a select + button to the top of the release relationship editor that makes the pending changes. So you can still review them and tick the “make votable” checkbox before submitting.

9 Likes

Mostly worked.

I was able to submit 400 remove relationship edits before it threw an error. (That leaves just two-and-a-half recordings where I can manually click the delete buttons myself.)

1 Like

Wow thanks! I certainly bookmark this as a reference to how to manipulate the relationship editor!! :slight_smile:

2 Likes

It seems like the script throws a runtime error and aborts before removing all relationships from recordings (and before submitting any relationships at the release level) if the new relationships at the release level are edited in some way (e.g., changing credited text, or removing relationships that were user errors in the first place).

I fixed that back in April but botched incrementing the version number, so it probably didn’t auto-update. I just modified the gist to bump the version number again (no other changes).

2 Likes

Hopefully there’s still room to ask a few questions about the script in this particular topic, as I’ve had more than a few pages to use it on.
(Mainly because relationships being added to all tracks regardless of where it actually applies only serves as justification for places like Discogs not allowing batch operations of any kind.)

Is it possible that certain improvements could be made as to how it selects relationships, like the ability to deselect the ones that shouldn’t be moved? Or perhaps something that only affects a certain selection of tracks?