musicbrainz-scripts icon indicating copy to clipboard operation
musicbrainz-scripts copied to clipboard

mb-reledit-copy_dates.user.js: Copy dates on recordings” script only works if used as first action after "Edit Relationships" on a release

Open vzell opened this issue 1 year ago • 4 comments

When I try to use the “Copy dates on recordings” script from loujine it must be the FIRST action after pressing the “Edit Relationships” tab on a release. Otherwise it does just nothing.

My typical use case is copying dates of a live event to all the performers of a recording. First of all it ONLY works if the date is already set on the recordings “place” (it will NOT work if the recording has an “event” set with the date of the live live event.

But what really bugs me is that the script only works when it is executed right after pressing “Edit Relationships” as the FIRST event.

The other bug has already been mentioned. Pressing one of the two script buttons “Copy Dates” or “Removes Dates” has no visual feedback except that it either works when being the FIRST action after “Edit Relationships” or it only pretends doing its work and adding a comment to the notes section if it is NOT called as the FIRST action after “Edit Relationships”

vzell avatar Aug 28 '23 19:08 vzell

I'm using Tampermonkey v4.19.0 on Chrome

vzell avatar Aug 29 '23 11:08 vzell

Any progress on this ?

vzell avatar Nov 11 '23 10:11 vzell

When you have a couple of entries where the script should act upon, it recently stops after filling in the first edit with the right data but it doesn't "press" the OK button by itself. If I do it manually the script proceeds to the next edit and again waits on the confirmation dialog. This eventually goes on until all edits have been done.

vzell avatar Apr 11 '24 07:04 vzell

When you have a couple of entries where the script should act upon, it recently stops after filling in the first edit with the right data but it doesn't "press" the OK button by itself. If I do it manually the script proceeds to the next edit and again waits on the confirmation dialog. This eventually goes on until all edits have been done.

It appears the query selector is not finding the button element. I modified my local copy to resolve this by replacing: 82querySelector('.dialog-content button.positive').click(); with 82: const dialog = document.getElementById('edit-relationship-dialog'); 83: dialog.querySelector('button.positive').click();

cslowinski avatar Apr 21 '24 10:04 cslowinski