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

Ability to specify sort order for sub-works that are part of an aggregate work.

      We can't set the work parts order in a parent work in the work-work "part of" relationship (related to STYLE-69).
      Example : 組曲「九尾」〜玉藻前〜照魔鏡〜殺生石 (not 殺生石〜照魔鏡〜玉藻前 as it is now reversed, based on title characters)
      From MBS-3062


      I apologize if there's already a ticket for this...

      We need the ability to set the sort order for sub-works.
      For example, is the sub-work, the 1st movement? the 2nd movement? etc...
      This is important because not all sub-works follow the I., II., III., naming convention and there is no way to know what is their original order. (As of now, I'm adding the order in the comments (example: http://musicbrainz.org/work/f86bad98-b743-4597-aeba-8605c7dcb603)

      Perhaps this should be set as an attribute when linking two works.
      Ideally, there should be an AJAX UI where we could drag the new sub-work and drag it into the existing list of parts and place it in the desired position.
      A simpler solution would be to attribute a number to each sub-work (attribute of the work -> part of work relationship) but MB would need to be smart and not allow two sub-works to have the same number (it should automatically move them back if a sub-work is added in the middle.

          [MBS-3375] Ability to specify sort order for sub-works that are part of an aggregate work.

          yvanzo made changes -
          Link New: This issue is related to STYLE-588 [ STYLE-588 ]
          Michael Wiencek made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Beta Testing [ 10002 ] New: Closed [ 6 ]
          Michael Wiencek made changes -
          Fix Version/s New: 2015-04-27 [ 10314 ]
          Due Date New: 2015-04-27 00:00:00.0

          (This is on the beta server but won't be usable until the link types are actually marked as orderable.)

          Michael Wiencek added a comment - (This is on the beta server but won't be usable until the link types are actually marked as orderable.)
          Michael Wiencek made changes -
          Status Original: Review Submitted [ 5 ] New: In Beta Testing [ 10002 ]
          Michael Wiencek made changes -
          Status Original: Reopened [ 4 ] New: Review Submitted [ 5 ]

          https://bitbucket.org/metabrainz/musicbrainz-server/pull-request/1429/add-an-admin-interface-for/diff

          This adds the admin interface and makes the arrow buttons move the relationships properly.

          Michael Wiencek added a comment - https://bitbucket.org/metabrainz/musicbrainz-server/pull-request/1429/add-an-admin-interface-for/diff This adds the admin interface and makes the arrow buttons move the relationships properly.

          Yeah, that is possible, though I think the only good way to do that would be to write a postgres extension that can work with ORDER BY to do a natural sort...a while ago I investigated a bunch of PL/SQL and pure-SQL solutions that didn't work out. That might be a good idea. It could be slightly annoying to have to have different sorting code for manual/automatic series, though. Maybe we should get rid of the automatic/manual distinction and just have everything sorted by text attributes. The up/down arrows would have to go in that case.

          Michael Wiencek added a comment - Yeah, that is possible, though I think the only good way to do that would be to write a postgres extension that can work with ORDER BY to do a natural sort...a while ago I investigated a bunch of PL/SQL and pure-SQL solutions that didn't work out. That might be a good idea. It could be slightly annoying to have to have different sorting code for manual/automatic series, though. Maybe we should get rid of the automatic/manual distinction and just have everything sorted by text attributes. The up/down arrows would have to go in that case.

          nikki added a comment -

          Couldn't automatically-ordered series just use the text attributes to determine the order and have all the link orders as 0?

          nikki added a comment - Couldn't automatically-ordered series just use the text attributes to determine the order and have all the link orders as 0?

          Of course for automatically-ordered series, the text attributes are what determine the link orders, so if two items have the same text attribute then the link orders should be either the same, or different but in an undefined order.

          Michael Wiencek added a comment - Of course for automatically-ordered series, the text attributes are what determine the link orders, so if two items have the same text attribute then the link orders should be either the same, or different but in an undefined order.

            bitmap Michael Wiencek
            benji99 Benji99
            Votes:
            18 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2015-04-27