• George Koltsov's avatar
    Convert empty strings to nil in ImportExport::BaseObjectBuilder · 4783fab6
    George Koltsov authored
    - BaseObjectBuilder is used to look up existing objects
      like labels during import, instead of creating one
    - For example, if a label is used on an epic and a board,
      we do not want to create 2 labels and instead reuse an
      one
    - If a label is exported with description: '', and then imported
      back, rails will convert description to be nil
    - Later on, when we try to identify a label BaseObjectBuilder
      uses description: '' as one of the where causes and
      nil != '', hence label lookup fails and the relation creation
      fails as well
    - This MR converts any empty strings to nil inside BaseObjectBuilder
      so it does not happen anymore
    4783fab6
group_object_builder.rb 1.33 KB