<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions in 10.2.8930</title>
<link>https://overflow.efficy.io/?qa=questions/developers/bug-fixes/major-bug-fixes/10-2-8930</link>
<description>Powered by Question2Answer</description>
<item>
<title>10.2.8930: Bug in globals OpenEdit and ParseDuration due to windowManager introduction</title>
<link>https://overflow.efficy.io/?qa=2232/globals-openedit-parseduration-windowmanager-introduction</link>
<description>&lt;p&gt;Efficy 10.2 re-introduces the &lt;strong&gt;window manager&lt;/strong&gt; to store and restore the size of opened windows. Related to these changes, two issues have been identified.&lt;/p&gt;

&lt;p&gt;The patch code below can be applied to your 10.2 release to fix them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One:&lt;/strong&gt;  Opening a second edit window for the same entity (e.g. appointment) is not possible. The focus is forwarded to the first opened window of the same entity. Below the fixed standard function.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function OpenEdit(Page, Entity, Key, Action, ExtraParam) {
    var URL = &quot;edit?page=&quot; + Page + &quot;&amp;amp;entity=&quot; + Entity + &quot;&amp;amp;key=&quot; + Key + &quot;&amp;amp;action=&quot; + EscapeName(Action)
    if (ExtraParam) URL += &quot;&amp;amp;&quot; + ExtraParam;
    if (Key === 0)
           Key = '0' + GetRandom();
    var wnd = OpenNewWindow('Edit' + Entity + Key, URL, 1014, 0, '', true);
    return wnd
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Two:&lt;/strong&gt; In some situations, the task duration was not correctly translated to a number. &lt;/p&gt;

&lt;p&gt;Replace this code snippet in standard&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function ParseDuration(val) {
                if (val == &quot;&quot;) return 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function ParseDuration(val) {
    // Only parse duration text, not number
    if (!isNaN(val)) return +val;
    if (val.trim() === '') return 0;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We will continue to use this category for future known issues&lt;/p&gt;
</description>
<category>10.2.8930</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2232/globals-openedit-parseduration-windowmanager-introduction</guid>
<pubDate>Fri, 27 Jan 2017 11:47:26 +0000</pubDate>
</item>
</channel>
</rss>