Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-13744

"Update recording title" shown when no recording is selected

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2024-09-17
    • None
    • Release editor
    • None

      1. Start adding a new release that isn't based on an existing one.
      2. On the recordings tab, click a track's "Edit" button and then type something into the "Search" field.

      As soon as the search text differs from the track title (even by just whitespace), the "Update the recording title to match the track title" checkbox appears. This doesn't make sense, since I haven't selected an existing recording to update. The checkbox persists even after I've closed the bubble without selecting an existing recording. If I edit the search text to match the track title, the checkbox disappears.

      The edit note tab doesn't display recording additions, so it's disconcerting to see this checkbox – it makes me unsure of whether the name of the new recording is going to match the track title or the search term. (From manual testing, I think that the recording fortunately still uses the track's title.)

      There are a zillion existing tickets still open about the search field incorrectly renaming recordings (see chaban's helpful list on MBS-8952, fixed by bitmap). I'm not sure how many of them are dupes that can be closed now, but I'm still able to repro the issue described here on beta.

          [MBS-13744] "Update recording title" shown when no recording is selected

          GitHub Bot added a comment -

          See code changes in pull request #3367 submitted by derat.

          GitHub Bot added a comment - See code changes in pull request #3367 submitted by derat .

          derat added a comment -

          The cause of this seems pretty obvious. In root/static/scripts/release-editor/fields.js:

            titleDiffersFromRecording() {
              return this.name() !== this.recording().name;
            }
          
            artistDiffersFromRecording() {
              const recording = this.recording();
          
              /*
               * This function is used to determine whether we can update the
               * recording AC, so if there's no recording, then there's nothing
               * to compare against.
               */
              if (!recording || !recording.gid) {
                return false;
              }
          
              return !artistCreditsAreEqual(
                this.artistCredit(),
                recording.artistCredit,
              );
            }
          

          Is there any reason why titleDiffersFromRecording shouldn't have the same !recording || !recording.gid early out?

          Maybe there's a deeper issue, in that it seems strange that the Track object's recording property is being updated by the search input instead of only being updated after a recording has been selected or cleared. Is that deliberate?

          derat added a comment - The cause of this seems pretty obvious. In root/static/scripts/release-editor/fields.js : titleDiffersFromRecording() { return this .name() !== this .recording().name; } artistDiffersFromRecording() { const recording = this .recording(); /* * This function is used to determine whether we can update the * recording AC, so if there 's no recording, then there' s nothing * to compare against. */ if (!recording || !recording.gid) { return false ; } return !artistCreditsAreEqual( this .artistCredit(), recording.artistCredit, ); } Is there any reason why titleDiffersFromRecording shouldn't have the same !recording || !recording.gid early out? Maybe there's a deeper issue, in that it seems strange that the Track object's recording property is being updated by the search input instead of only being updated after a recording has been selected or cleared. Is that deliberate?

            derat derat
            derat derat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2024-09-17