#bookbrainz

/

      • Shubh
        monkey: just wanted to know if you started working on BB-288 ticket already?
      • BrainzBot
        BB-288: List publications / editions for creators https://tickets.metabrainz.org/browse/BB-288
      • monkey
        Negative Shubh ! I'll de-assign myself
      • unassign*
      • Shubh
        i will start working on it then
      • monkey
        Awesome ! thanks ! 👍
      • Shubh
        Also any update on unified-form PR?
      • monkey
        I'm having issues with building docker images that are slowing me down, but should have that fixed soon so I can deploy and test.
      • Shubh
        Also i was working on user script to export an entity from test to prod/beta, do you think it will encourage user to work on test.bb more without worrying about losing their work?
      • though there might be some issues with compatibility, that's the main reason i stopped working on it since it might crash prod/beta server due to this.
      • monkey
        I'm not keen to do that, no. the test server is really only for testing. After maybe one or two edits users should really go to the main website once they want to enter real data
      • Especially since the code being tested might create some entities in weird ways and have unintended consequences
      • CatQuest
        hm!
      • i liek that idea. if yo uhad a way to import form test to beta i woudl definitly test more!
      • oh
      • well
      • nvm
      • monkey has a point
      • I'd expect this only being valid for a little time but if it's an user script dangers is that peopel will use it further
      • Shubh
        monkey: there's currently no way to get edition info from author credit in orm, right?
      • monkey
        I don't think there is, no
      • Yeah, it's all about getting the AC for an Edition, not the other way around
      • CatQuest
        svarte orm
      • Shubh
        Then i will make a PR for that one first
      • monkey: Also not related but wondering why we used belongsTo instead of hasMany here https://github.com/metabrainz/bookbrainz-data-j..., doesn't belongs* used for specifying inverse relations?
      • hasOne*
      • Ah so belongsTo is used when foreign key is defined on this entity itself, make sense
      • monkey
        Sorry, was preparing a write up but you got it :)
      • It's a bit ass-to-front to read IMO, but that's the way it goes
      • Shubh
        Also orm seems to be returning only single author credit for a author entity even if it have multiple editions referring to it using ACs.
      • i'm somewhat sure it has to do something with this relation https://github.com/metabrainz/bookbrainz-data-j... but not sure how to fix it.
      • Ah wait it does seem to be working fine in test
      • monkey: I realize we can directly fetch credited editions from author entity itself, would that PR for orm still make sense?
      • monkey
        How so? I would imagine we have a missing `editions()` method on the AuthrCredit ORM model no?
      • Or do you mean with a raw sql query?
      • Shubh
      • monkey
        Oh, so I forgot there is actually a method already, woops
      • Although there could be some caveat, looking at the comment. Don't remember whta it's about or if it's fixable
      • Might be possible to rewrite the raw sql from getEditionsCreditedToAuthor/getEditionGroupsCreditedToAuthor using the ORM methods `.leftJoin(…)`, `.where(…)` etc, as the issue seems to be returning a promise
      • Shubh
        though we might not be able to fetch other edition attribs (like Identifiers) using this method.
      • would it be fine if i use the ac method instead?
      • monkey: is it possible for two different edition to have same authorCreditID?
      • monkey
        In theory it would be possible, but in practice not sure that will happen
      • If I remember correctly we create a new AC for each Edition, even if the value is the same as another AC
      • Shubh
        These seem to share the same authorCreditID
      • monkey
        OK, I reckon this code actually fetches an equal existing author credit and returns that isntead of creating a new one: https://github.com/metabrainz/bookbrainz-data-j...
      • Didn't think we had that optimization already coded.
      • So indeed expect multiple Editions and EGs with same AC
      • agatzk has quit
      • agatzk joined the channel
      • Shubh
        monkey: prefilling author credit editor with author in query params `?author=bbid` sounds good to you?
      • monkey
        I would expect it to be possible to seed with an author name which would fill the AC search input and allow the user to search easily. Not sure how hard that'll be to do with current setup, but worth a try
      • The search also supports BBIDs so that makes sense