<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8300</bug_id>
          
          <creation_ts>2015-09-15 14:47:18 +0000</creation_ts>
          <short_desc>The name check while importing a layer fails</short_desc>
          <delta_ts>2015-11-06 12:51:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Belen Barros Pena">belen.barros.pena</reporter>
          <assigned_to name="Michael Wood">michael.g.wood</assigned_to>
          <cc>alexandru.costinx.roman</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54090</commentid>
    <comment_count>0</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2015-09-15 14:47:18 +0000</bug_when>
    <thetext>Found in master:ea562de57590c966cd5a75fda8defecd397e6436

Steps to reproduce:

* Create a Toaster project with release &apos;master&apos;
* Click on the &apos;import layer&apos; tab
* Enter a layer name that already exists for that project (eg. meta-oe)

When you focus out of the name field, the &apos;loading&apos; notification appears, but the name check never completes and you can merrily proceed to import the layer, generating a duplicate. 

The browser console shows the following error:

Uncaught TypeError: Cannot read property &apos;length&apos; of undefined
importlayer.js:217</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54092</commentid>
    <comment_count>1</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2015-09-15 14:50:43 +0000</bug_when>
    <thetext>By the way, we might think of checking the layer name also on submitting the form. That would have prevented me from importing the layer with an already existing name. Since I was able to import the layer, I am assuming the check is not happening on submit, only on focus out in the layer name field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55507</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-10-20 14:15:02 +0000</bug_when>
    <thetext> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2f52ef4b2f22dc266bbf61bebddbcf8bc65e72c8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56284</commentid>
    <comment_count>3</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2015-11-06 12:51:30 +0000</bug_when>
    <thetext>Verified on master: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>