# Clone relations in Release Editor

**URL:** https://community.metabrainz.org/t/clone-relations-in-release-editor/499571
**Category:** MusicBrainz
**Tags:** userscripts, relationships
**Created:** [October 17, 2020, 8:19am UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571 "2020-10-17T08:19:22Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)
#### Post date: [October 17, 2020, 8:19am UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/1 "2020-10-17T08:19:23Z")

</div>

This topic about @loujin’s new [Clone relations in Release Editor](https://github.com/loujine/musicbrainz-scripts/blob/master/mb-reledit-clone_relations.user.js):

> [@A new MusicBrainz user script was released](https://community.metabrainz.org/t/a-new-musicbrainz-user-script-was-released/77897/16):
>
> An often asked-for script: clone relationships from one recording to some others in the release editor.
> 
> Description:  
> Select the recordings you want with the usual checkboxes (including the one you want to copy from), enter the index number of the recording you want to copy from (by default the 1st one), and click “Clone relations”.
> 
> ![screenshot_clone_rels_script](https://community.metabrainz.org/uploads/default/original/3X/b/2/b269cf3f1de32e3be8233f35ba03b6e3675671d7.png)
> 
> Credits, attributes and dates should be cloned too; recording-recording and recording-work relations are skipped.
> 
> Download link on GitHub: [install](https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-reledit-clone_relations.user.js) / [see code](https://github.com/loujine/musicbrainz-scripts/blob/master/mb-reledit-clone_relations.user.js)
> 
> Ping me here or open an issue in case of trouble, I only tested a few basic cases

---

<div class="post-metadata">

### Author: ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)
#### Post date: [October 17, 2020, 8:22am UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/2 "2020-10-17T08:22:28Z")

</div>

@loujin, so it does copy recording relationships.

Do you think you could copy the remote release’s release relationships?

I don’t remember what I needed the most but your script seems great and useful!

---

<div class="post-metadata">

### Author: ![loujin](https://community.metabrainz.org/user_avatar/community.metabrainz.org/loujin/32/126_2.png) [@loujin](https://community.metabrainz.org/u/loujin)
#### Post date: [October 17, 2020, 11:39am UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/3 "2020-10-17T11:39:00Z")

</div>

Just to be clear, the script only clones relations **within** a release for the moment. I was probably asked also about a script to copy relations from another release but I haven’t looked at that yet.

> [@jesus2099](#):
>
> Do you think you could copy the remote release’s release relationships?

Not sure I get it, you would like to point to another release and get the release relationships from there to the current release?

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [October 17, 2020, 5:52pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/4 "2020-10-17T17:52:08Z")

</div>

@loujin - Thank You for yet another very useful script, but for some reason the button won’t push for me in Vivaldi browser. I have this issue with other scripts of yours. “_Copy Dates_” and “_Guess Works_” work fine, but this new one and “_Relation Attributes_” have buttons that don’t “push in” for me.

BUT if I swap to Firefox on a different PC and use them in exactly the same way there is no problem. Both using Violent Monkey to run the scripts.

Just tried this out to copy 27 vocal artists from one recording to two other versions of it - works brilliant in Firefox. Superb time savers you produce. ( [Edits for Sun City - MusicBrainz](https://musicbrainz.org/release/81d2c2dd-3ea5-426a-871d-b1dbee3f4a5b/edits) )

---

<div class="post-metadata">

### Author: ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)
#### Post date: [October 17, 2020, 10:33pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/5 "2020-10-17T22:33:25Z")

</div>

> [@loujin](#):
>
> Just to be clear, the script only clones relations **within** a release for the moment. I was probably asked also about a script to copy relations from another release but I haven’t looked at that yet.

Oh sorry, then my request is not relevant. 😅

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [February 26, 2021, 7:03pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/6 "2021-02-26T19:03:57Z")

</div>

HI @loujin - a bug report for you. Or just confused copying pixies

> [@A new MusicBrainz user script was released](https://community.metabrainz.org/t/a-new-musicbrainz-user-script-was-released/77897/16):
>
> Clone relations in Release Editor

Err… had something WEIRD happen today. [Edit #77612070 - MusicBrainz](https://musicbrainz.org/edit/77612070)

I was in this Release: [Release “Wish You Were Here” by Pink Floyd - MusicBrainz](https://musicbrainz.org/release/83b6295b-b3ec-476b-aa47-5d3aa9c4e475) and wanted to copy the artist relationships of the recordings from this release: [https://musicbrainz.org/release/424db76a-8604-4350-a50f-766f58570470](https://musicbrainz.org/release/424db76a-8604-4350-a50f-766f58570470)

I went track by track, and use the edit box at the top of the page to paste in the URL of the recording I wanted to copy. In the Quad version, copying from the Vinyl version.

BUT something has reversed.

The “sampled by” became “samples of”. And “remixes” became “remix of”. i.e. the 1975 track was suddenly a remix of a 21st Century track and somehow using samples from music written decades after it. Time travelling… or accidentally reversal of reality.

I am fixing the errors now, but if you are quick enough you can click on the Quad link above and see the comedy in action as I now delete those unexpected relationships.

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [February 26, 2021, 7:04pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/7 "2021-02-26T19:04:49Z")

</div>

Oh, and this is still borked in my Vivaldi browser. I have to fire up Firefox to use it. Weird - some script buttons work, some don’t.

---

<div class="post-metadata">

### Author: ![loujin](https://community.metabrainz.org/user_avatar/community.metabrainz.org/loujin/32/126_2.png) [@loujin](https://community.metabrainz.org/u/loujin)
#### Post date: [February 26, 2021, 10:43pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/8 "2021-02-26T22:43:51Z")

</div>

> [@IvanDobsky](#):
>
> Err… had something WEIRD happen today

Looks like the script does not handle the relation direction (only a problem on recording-recording relations I generally don’t use)  
I opened [recording-recording relation direction is not copied in the clone rels script · Issue #28 · loujine/musicbrainz-scripts · GitHub](https://github.com/loujine/musicbrainz-scripts/issues/28) that I’ll keep updated when I have a tested solution

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [February 26, 2021, 11:40pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/9 "2021-02-26T23:40:48Z")

</div>

> [@loujin](#):
>
> Looks like the script does not handle the relation direction

Yep, that is what I am seeing here…

> [@loujin](#):
>
> (only a problem on recording-recording relations I generally don’t use)

I kinda guessed that is how it slipped past testing. Thank @drsaunde for spotting this. If I had seen these I would have removed them in the initial edit.

Thanks for your time saving scripts. 🙂

---

<div class="post-metadata">

### Author: ![Darkloke](https://community.metabrainz.org/user_avatar/community.metabrainz.org/darkloke/32/22634_2.png) [@Darkloke](https://community.metabrainz.org/u/Darkloke)
#### Post date: [March 4, 2021, 12:19pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/10 "2021-03-04T12:19:39Z")

</div>

> [@A new MusicBrainz user script was released](https://community.metabrainz.org/t/a-new-musicbrainz-user-script-was-released/77897/16):
>
> Credits, attributes and dates should be cloned too; recording-recording and recording-work relations are skipped.

Hi, @jesus2099, just noticed this script. Could I ask - can you modify it to make it work with recording-work relations. 99% of my working time in relationships editor is to manually assign/copy credits from recordings to newly created works. Such modification of the script would ease my life a lot!

---

<div class="post-metadata">

### Author: ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)
#### Post date: [March 4, 2021, 3:52pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/11 "2021-03-04T15:52:17Z")

</div>

It’s a @loujin script. 🙂

---

<div class="post-metadata">

### Author: ![loujin](https://community.metabrainz.org/user_avatar/community.metabrainz.org/loujin/32/126_2.png) [@loujin](https://community.metabrainz.org/u/loujin)
#### Post date: [March 4, 2021, 7:30pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/12 "2021-03-04T19:30:29Z")

</div>

> [@Darkloke](#):
>
> manually assign/copy credits from recordings to newly created works

Can you give me an example? I’m not sure if you mean you want to copy an existing recording-work relation from a recording to another, or that you want to transform relations on an existing recording to the equivalent relations on the newly created work

---

<div class="post-metadata">

### Author: ![Darkloke](https://community.metabrainz.org/user_avatar/community.metabrainz.org/darkloke/32/22634_2.png) [@Darkloke](https://community.metabrainz.org/u/Darkloke)
#### Post date: [March 4, 2021, 10:01pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/13 "2021-03-04T22:01:50Z")

</div>

> [@loujin](#):
>
> Can you give me an example? I’m not sure if you mean you want to copy an existing recording-work relation from a recording to another, or that you want to transform relations on an existing recording to the equivalent relations on the newly created work

Ok. Here is the screenshot. Lets say i created a new release and assigned artists for the track list. Now i want to create new works for these new recordings and simply copy already assigned artists for the tracks to these new works (since mostly they are the same).

> **[Screenshot](https://prnt.sc/10d75v5)**
>
> Captured with Lightshot

---

<div class="post-metadata">

### Author: ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)
#### Post date: [March 4, 2021, 11:47pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/14 "2021-03-04T23:47:30Z")

</div>

Track artists are performers but what role do they have on works?  
Performers are not always lyricists or composers of the works they perform.  
And even if they are, you would have to say whether they are lyricist and/or composers, so, it’s not really a straightforward copy any more.

Also as you have already selected some artists for tracks, the last 10 artists are in your recently used artists drop down selector when you want to add a new work-arist relationship.

---

<div class="post-metadata">

### Author: ![Darkloke](https://community.metabrainz.org/user_avatar/community.metabrainz.org/darkloke/32/22634_2.png) [@Darkloke](https://community.metabrainz.org/u/Darkloke)
#### Post date: [March 5, 2021, 5:23am UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/15 "2021-03-05T05:23:17Z")

</div>

> [@jesus2099](#):
>
> Track artists are performers but what role do they have on works?  
> Performers are not always lyricists or composers of the works they perform.

Coz i am working with soundtrack and production music, so in these cases its mostly the same people. +Also i am checking PROs.

And i know about recently used, but its still a double work to assign them second time + high probability of human error when many of them or large release.

---

<div class="post-metadata">

### Author: ![jesus2099](https://community.metabrainz.org/user_avatar/community.metabrainz.org/jesus2099/32/36_2.png) [@jesus2099](https://community.metabrainz.org/u/jesus2099)
#### Post date: [March 5, 2021, 3:12pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/16 "2021-03-05T15:12:59Z")

</div>

Do you already know about PRO inaccuracy for work credits?

---

<div class="post-metadata">

### Author: ![Darkloke](https://community.metabrainz.org/user_avatar/community.metabrainz.org/darkloke/32/22634_2.png) [@Darkloke](https://community.metabrainz.org/u/Darkloke)
#### Post date: [March 5, 2021, 3:37pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/17 "2021-03-05T15:37:33Z")

</div>

Yes, but we are going offtopic.

---

<div class="post-metadata">

### Author: ![loujin](https://community.metabrainz.org/user_avatar/community.metabrainz.org/loujin/32/126_2.png) [@loujin](https://community.metabrainz.org/u/loujin)
#### Post date: [March 5, 2021, 7:19pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/18 "2021-03-05T19:19:56Z")

</div>

> [@Darkloke](#):
>
> Now i want to create new works for these new recordings and simply copy already assigned artists for the tracks to these new works

Sorry, as @jesus2099 said, there is no easy way to convert artist-recording relations to artist-work ones. If you know a bit of javascript and the MB relations model you can try to modify [musicbrainz-scripts/mb-reledit-clone\_relations.user.js at master · loujine/musicbrainz-scripts · GitHub](https://github.com/loujine/musicbrainz-scripts/blob/master/mb-reledit-clone_relations.user.js#L58) to convert artist-recording link types to artist-work ones.

---

<div class="post-metadata">

### Author: ![reosarevok](https://community.metabrainz.org/user_avatar/community.metabrainz.org/reosarevok/32/69228_2.png) [@reosarevok](https://community.metabrainz.org/u/reosarevok)
#### Post date: [March 30, 2021, 11:58am UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/19 "2021-03-30T11:58:18Z")

</div>

@loujin: IIUC, the actual idea @Darkloke needs is a way to turn track / recording artists into work composers. I guess you don’t have anything for that either? Track artist into composer might actually be useful for classical too sometimes, although I guess it’s often easy enough to batch-add.

---

<div class="post-metadata">

### Author: ![loujin](https://community.metabrainz.org/user_avatar/community.metabrainz.org/loujin/32/126_2.png) [@loujin](https://community.metabrainz.org/u/loujin)
#### Post date: [March 30, 2021, 11:17pm UTC](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571/20 "2021-03-30T23:17:17Z")

</div>

> [@reosarevok](#):
>
> the actual idea @Darkloke needs is a way to turn track / recording artists into work composers. I guess you don’t have anything for that either?

Ah, I misunderstood then. No, I don’t have a script for that either

[Next page](https://community.metabrainz.org/t/clone-relations-in-release-editor/499571.md?page=2)
