<?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>9936</bug_id>
          
          <creation_ts>2016-07-14 12:56:15 +0000</creation_ts>
          <short_desc>The &quot;Add layer&quot; button in the import layer page is always disabled</short_desc>
          <delta_ts>2016-10-24 22:08:35 +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>2.2</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.2 M4</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>belen.barros.pena</cc>
    
    <cc>brian.avery</cc>
    
    <cc>david.reyna</cc>
    
    <cc>davidx.lopez.barriba</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>libertad.gonzalez.de.la.cruz</cc>
    
    <cc>michael.g.wood</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</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>63971</commentid>
    <comment_count>0</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-07-14 12:56:15 +0000</bug_when>
    <thetext>Steps to reproduce:

1. Create a Toaster project
2. Go to the &quot;Import layer&quot; page
3. Scroll down to the bottom of the page, where the &quot;Layer dependencies&quot; section is, and try to add a layer to the list of dependencies (e.g meta-oe)

Outcome: when you select meta-oe from the typeahead suggestions, the &quot;add layer&quot; button remains disabled, so you can&apos;t add any layer dependencies</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64258</commentid>
    <comment_count>1</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-07-21 09:42:29 +0000</bug_when>
    <thetext>Comment from Michael Wood: 

&quot;that bug with the layer dependencies in the import layer page is because the typeahead isn&apos;t populating layerDepsChoices which is what is checked to see if you&apos;ve selected a valid choice&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64259</commentid>
    <comment_count>2</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-07-21 09:46:48 +0000</bug_when>
    <thetext>Also from Michael: 

&quot;the event for the new typehead is .on(&quot;typeahead:select&quot;, ..  instead of &quot;typeahead-choices-change&apos;. if you changed that, and added the button toggle disabled/enabled that might be it&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64574</commentid>
    <comment_count>3</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-07-28 09:21:03 +0000</bug_when>
    <thetext>*** Bug 10042 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65436</commentid>
    <comment_count>4</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2016-08-23 06:36:19 +0000</bug_when>
    <thetext>The current &quot;typeahead-choices-change&quot; method does not work, as Michael observed.

If I replace with this function, then selecting a layer from the typeahead list will safely enable the &quot;Add&quot; button, and disable it when the user manually changes the edit box.

  // when a typeahead choice is selected, enabling the &quot;Add layer&quot; button
  // since we know for sure this is a valid layer
  layerDepInput.on(&quot;typeahead:select&quot;, function (event, data) {
    if (data.name) {
      layerDepBtn.removeAttr(&quot;disabled&quot;);
    }
  });

What I cannot yet figure out is how to fetch the active list of lookahead layer names from the widget, so that I can test against that list when the layerDepInput.on(&quot;input change&quot;,...) is invoked - doing what &quot;typeahead-choices-change&quot; was supposed to provide.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65483</commentid>
    <comment_count>5</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2016-08-24 14:45:24 +0000</bug_when>
    <thetext>Patch submitted for review to the toaster mailing list

https://lists.yoctoproject.org/pipermail/toaster/2016-August/005131.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66983</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-10-06 14:16:42 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/atom/8df56061f63b63b77a0c7a7ddd75812e3b5a88c4
Fix regression introduced by switching typeahead library. Make sure we
enable and disable the add button based on whether the selection event
has fired or not.

[YOCTO #9936]

(Bitbake rev: cfef79e98b023252cd116d6cc4f90d261d47d13f)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67512</commentid>
    <comment_count>7</comment_count>
    <who name="David Lopez Barriba">davidx.lopez.barriba</who>
    <bug_when>2016-10-24 22:08:35 +0000</bug_when>
    <thetext>Verified on commit : 4b94b498e21aeba945fe7e72a6b7c4bb0314fb83
works ok</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>