You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Krzysztof Podejma (JIRA)" <ji...@apache.org> on 2007/05/28 14:19:15 UTC

[jira] Created: (OFBIZ-1041) various values in allowSolicitation variable break some screens

various values in allowSolicitation variable  break some screens
----------------------------------------------------------------

                 Key: OFBIZ-1041
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: party
    Affects Versions: SVN trunk, Release Branch 4.0
            Reporter: Krzysztof Podejma
            Priority: Minor
             Fix For: SVN trunk, Release Branch 4.0
         Attachments: allowSolicitation.patch

in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
additionaly different values break forms in other apps like crmsfa

please see my patch

Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512629 ] 

Adrian Crum commented on OFBIZ-1041:
------------------------------------

The problem still exists. From line 224 of  applications/party/webapp/partymgr/party/editcontactmech.ftl:

      <select name="allowSolicitation">
        <option>${(mechMap.partyContactMech.allowSolicitation)?if_exists}</option>
        <option></option><option>${uiLabelMap.CommonY}</option><option>${uiLabelMap.CommonN}</option>
      </select>

If a user has selected a locale that doesn't use Y and N to represent Yes and No, then the data returned by this code will be invalid.

The code should be something like:

<select name="allowSolicitation">
  <#if (mechMap.partyContactMech.allowSolicitation)?exists >
    <#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")><option value="Y">${uiLabelMap.CommonY}</option></#if>
    <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")><option value="N">${uiLabelMap.CommonN}</option></#if>
  </#if>
  <option></option><option value="Y">${uiLabelMap.CommonY}</option><option value="N">${uiLabelMap.CommonN}</option>
</select>

Maybe Krzysztof can prepare an updated patch.


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504351 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

I think checking my patch will make you sure that we have the same point of view.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512788 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

? in Finally(?) above was premonition : 

Put test in place of Y. Definitively not my day, I should not work on sunday :o(

OK in trunk rev. 556382 release 556383

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Scott Gray (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504429 ] 

Scott Gray commented on OFBIZ-1041:
-----------------------------------

Hi Jacques

I think David means front end to be user interface and back end to be the server processing.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reopened OFBIZ-1041:
------------------------------------


Yes right sorry, open for a patch (we are close to it I guess ;o)

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512795 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

It should be done, but of course more tests are always welcome...

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504387 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

code :
      <select name="allowSolicitation">
        <#if (mechMap.partyContactMech.allowSolicitation)?exists >
          <option><#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")>${uiLabelMap.CommonY}</#if>
                  <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")>${uiLabelMap.CommonN}</#if>
          </option>
        </#if>
        <option></option><option>${uiLabelMap.CommonY}</option><option>${uiLabelMap.CommonN}</option>
      </select>

is correct because we want to show current value of alllowSolicitation to user in his language.

your way is not so right in this case because if user omit  this field, it will be submited with N value. Even if value was Y

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Oleg Andreyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504366 ] 

Oleg Andreyev commented on OFBIZ-1041:
--------------------------------------

Thanks Krzysztof for pointing this error out. Current code in editcontactmech.ftl is inadmissible.

This is fragment of your patch

       <select name="allowSolicitation">
-        <option>${(mechMap.partyContactMech.allowSolicitation)?if_exists}</option>
+        <#if (mechMap.partyContactMech.allowSolicitation)?exists >
+          <option><#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")>${uiLabelMap.CommonY}</#if>
+                  <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")>${uiLabelMap.CommonN}</#if>
+          </option>
+        </#if>
         <option></option><option>${uiLabelMap.CommonY}</option><option>${uiLabelMap.CommonN}</option>
       </select>

It's something wrong.

I think the right way for ftl is:
            <select name="somename">
                <option value="N">${uiLabelMap.CommonN}</option>
                <option value="Y">${uiLabelMap.CommonY}</option>
            </select>

correspondingly for forms:
            <drop-down allow-empty="false">
                <option key="Y" description="${uiLabelMap.CommonY}"/>
               <option key="N" description="${uiLabelMap.CommonN}"/>
           </drop-down>



> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512786 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

Oops, some parenthesis were missing in rev. 556376
of course should not be 
	<#if (()!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if>
	<#if (()!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if>
but	
	<#if ((()!"") == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if>
	<#if ((()!"") == "N")><option value="N">${uiLabelMap.CommonN}</option></#if>
Not yet well familiarised with ! operator :o/

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504447 ] 

Krzysztof Podejma edited comment on OFBIZ-1041 at 6/13/07 2:50 PM:
-------------------------------------------------------------------

Adrian, your proposal doesn't use current value so if user wants change only phone number, he has to set allowSolitation field too.
If not, form will change Y to N. I think it is not user friendly and a little bit confusing.

I think "Y","N","" is the right way
"" - dont know 


 was:
Adrian, your proposal doesn't use current value so if user wants change only phone number, he has to set allowSolitation field too.
If not, form will change Y to N. I think it is not user friendly and a little bit confusing.


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512787 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

And it seemed to me a simple issue  ;o)

Finally(?) in trunk rev. 556379 release 556381

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504424 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

David,

Can you elaborate on this, please ?
 I understand that nothing else than "Y" and "N" should be stored in DB indicator fields. But I don't see why we should not internationalise the back-end (here, I assume that front-end is eCommerce or POS for instance, and back-end other applications components like order, party, etc. )

Thanks

Jacques

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512737 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

Adrian,

Yes I know you are right, I laready read your comment above ;o). I did that late tonight yesterday to treat quickly all cases and I simplified to be sure to not warp everything. I will review my work. It's easier now that it's "standardized".

Thanks

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504346 ] 

Adrian Crum commented on OFBIZ-1041:
------------------------------------

Maybe something is getting lost in the translation. It seems to me that the attached patches ENFORCE David's  point.

For example, the line in applications/party/webapp/partymgr/party/editcontactmech.ftl -

<option>${(mechMap.partyContactMech.allowSolicitation)?if_exists}</option>

wouldn't make sense to someone who doesn't speak English because the raw data (Y/N) is being displayed.

The patch fixes this by using the raw data (Y/N) to look up the correct UI label (CommonY/CommonN) -

        <#if (mechMap.partyContactMech.allowSolicitation)?exists >
          <option><#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")>${uiLabelMap.CommonY}</#if>
                  <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")>${uiLabelMap.CommonN}</#if>
          </option>
        </#if>


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504394 ] 

David E. Jones commented on OFBIZ-1041:
---------------------------------------

Okay, I was just looking at the code and it looks like this breaks the pattern I noted as very important in my comments.

What this code does is internationalize what the user sees AND what is sent to the server. That will break things and is a big problem.

What needs to happen whenever there is a i18n'ed label inside <option></option> the value attribute on the option element MUST be used.

For example instead of:

<option>${uiLabelMap.CommonY}</option> (BAD)

you should use:

<option value="Y">${uiLabelMap.CommonY}</option> (GOOD)


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504400 ] 

David E. Jones commented on OFBIZ-1041:
---------------------------------------

Yeah, but that will actually break things more. As soon as you submit the form in a different locale and try to look at it the "Y" and "N" won't match.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1041.
----------------------------------

    Resolution: Won't Fix
      Assignee: Jacques Le Roux  (was: Si Chen)

Si, I think this issue should be closed. Else please feel free to re-open

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512790 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

I had to leave on weekend. Is it done now, or needs test?

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504398 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

in ofbiz trunk you have
      <select name="allowSolicitation">
        <option>${(mechMap.partyContactMech.allowSolicitation)?if_exists}</option>
        <option></option><option>${uiLabelMap.CommonY}</option><option>${uiLabelMap.CommonN}</option>
      </select>

and i fixed this to:
      <select name="allowSolicitation">
        <#if (mechMap.partyContactMech.allowSolicitation)?exists >
          <option><#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")>${uiLabelMap.CommonY}</#if>
                  <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")>${uiLabelMap.CommonN}</#if>
          </option>
        </#if>
        <option></option><option>${uiLabelMap.CommonY}</option><option>${uiLabelMap.CommonN}</option>
      </select>

my patch is a simple fix, not refactoring


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504405 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

maybe you haven't noticed. This patch adds 
        <!-- allowSolicitation is forced to Y or N -->
        <property-to-field resource="CommonUiLabels" property="CommonY" field-name="commonY"/>
        <property-to-field resource="CommonUiLabels" property="CommonY" field-name="commonN"/>
        <if>
            <condition><if-compare field-name="newPartyContactMech.allowSolicitation" operator="equals" value="${commonY}"/></condition>
            <then>
                <set field="newPartyContactMech.allowSolicitation" value="Y" />
            </then>
            <else-if>
                <condition><if-compare field-name="newPartyContactMech.allowSolicitation" operator="equals" value="${commonN}"/></condition>
             <then>
                <set field="newPartyContactMech.allowSolicitation" value="N" />
            </then>
            </else-if>
        </if>

to updatePartyContactMech to fix all other screen that want to pass invalid value

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: Drop-down current value styles (was Re: [jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens)

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks for clarification David.

Jacques

De : "Adrian Crum" <ad...@hlmksw.com>
> Very good points! Thank you for the insight.
>
> David E Jones wrote:
> >
> >
> > Adrian Crum (JIRA) wrote:
> >
> >> Also, a UI pattern I have been using lately is to have the current
> >> data select the correct list element, instead of displaying it
twice.
> >> Example:
> >>
> >> <select name="allowSolicitation">
> >>   <#assign allowSolicitation =
> >> (mechMap.partyContactMech.allowSolicitation)?default("N")>
> >>   <option value="Y"<#if allowSolitation == "Y">
> >> selected="selected"</#if>>${uiLabelMap.CommonY}</option>
> >>   <option value="N"<#if allowSolitation == "N">
> >> selected="selected"</#if>>${uiLabelMap.CommonN}</option>
> >> </select>
> >>
> >> Not that this approach is any better, it's just different.
> >
> >
> > The main reason we have not used this approach in general is that it
> > does not give as much information to the user. For simple
applications
> > it is fine and cleaner/smaller. For OFBiz we use the other pattern
with
> > the current values at the top and a separator that also default to
the
> > current value to err on the side of clarity and flexibility. The
form
> > widget supports both, BTW, and easily switches between them.
> >
> > The current value at the top has these benefits:
> >
> > 1. clarity: if another value is selected the user can still click on
the
> > drop-down and look at the top to see what the original value was
> >
> > 2. flexibility: if the current value is not part of the new options
then
> > we can't just select the one in the drop-down; this happens
currently in
> > various OFBiz screens, especially for status drop-downs that show
the
> > current status and all of the possible status transitions (usually
there
> > isn't a transition to go from one status back to itself)
> >
> > -David
> >
> >


Re: Drop-down current value styles (was Re: [jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens)

Posted by Adrian Crum <ad...@hlmksw.com>.
Very good points! Thank you for the insight.

David E Jones wrote:
> 
> 
> Adrian Crum (JIRA) wrote:
> 
>> Also, a UI pattern I have been using lately is to have the current 
>> data select the correct list element, instead of displaying it twice. 
>> Example:
>>
>> <select name="allowSolicitation">
>>   <#assign allowSolicitation = 
>> (mechMap.partyContactMech.allowSolicitation)?default("N")>
>>   <option value="Y"<#if allowSolitation == "Y"> 
>> selected="selected"</#if>>${uiLabelMap.CommonY}</option>
>>   <option value="N"<#if allowSolitation == "N"> 
>> selected="selected"</#if>>${uiLabelMap.CommonN}</option>
>> </select>
>>
>> Not that this approach is any better, it's just different.
> 
> 
> The main reason we have not used this approach in general is that it 
> does not give as much information to the user. For simple applications 
> it is fine and cleaner/smaller. For OFBiz we use the other pattern with 
> the current values at the top and a separator that also default to the 
> current value to err on the side of clarity and flexibility. The form 
> widget supports both, BTW, and easily switches between them.
> 
> The current value at the top has these benefits:
> 
> 1. clarity: if another value is selected the user can still click on the 
> drop-down and look at the top to see what the original value was
> 
> 2. flexibility: if the current value is not part of the new options then 
> we can't just select the one in the drop-down; this happens currently in 
> various OFBiz screens, especially for status drop-downs that show the 
> current status and all of the possible status transitions (usually there 
> isn't a transition to go from one status back to itself)
> 
> -David
> 
> 

Drop-down current value styles (was Re: [jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens)

Posted by David E Jones <jo...@hotwaxmedia.com>.

Adrian Crum (JIRA) wrote:
> Also, a UI pattern I have been using lately is to have the current data select the correct list element, instead of displaying it twice. Example:
> 
> <select name="allowSolicitation">
>   <#assign allowSolicitation = (mechMap.partyContactMech.allowSolicitation)?default("N")>
>   <option value="Y"<#if allowSolitation == "Y"> selected="selected"</#if>>${uiLabelMap.CommonY}</option>
>   <option value="N"<#if allowSolitation == "N"> selected="selected"</#if>>${uiLabelMap.CommonN}</option>
> </select>
> 
> Not that this approach is any better, it's just different.

The main reason we have not used this approach in general is that it does not give as much information to the user. For simple applications it is fine and cleaner/smaller. For OFBiz we use the other pattern with the current values at the top and a separator that also default to the current value to err on the side of clarity and flexibility. The form widget supports both, BTW, and easily switches between them.

The current value at the top has these benefits:

1. clarity: if another value is selected the user can still click on the drop-down and look at the top to see what the original value was

2. flexibility: if the current value is not part of the new options then we can't just select the one in the drop-down; this happens currently in various OFBiz screens, especially for status drop-downs that show the current status and all of the possible status transitions (usually there isn't a transition to go from one status back to itself)

-David


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504438 ] 

Adrian Crum commented on OFBIZ-1041:
------------------------------------

It's a good idea to keep a sharp line drawn between the service layer and the presentation layer. This patch introduces UI elements into the service layer.

Perhaps a better approach in the service layer is to simply check for "Y" - if it is anything else, default to "N".

Also, a UI pattern I have been using lately is to have the current data select the correct list element, instead of displaying it twice. Example:

<select name="allowSolicitation">
  <#assign allowSolicitation = (mechMap.partyContactMech.allowSolicitation)?default("N")>
  <option value="Y"<#if allowSolitation == "Y"> selected="selected"</#if>>${uiLabelMap.CommonY}</option>
  <option value="N"<#if allowSolitation == "N"> selected="selected"</#if>>${uiLabelMap.CommonN}</option>
</select>

Not that this approach is any better, it's just different.


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504408 ] 

David E. Jones commented on OFBIZ-1041:
---------------------------------------

Okay, yeah. That's the exact point though.

We don't want to internationalize the back-end and the values going into the database. We ONLY want to internationalize the front-end, ie ONLY the stuff the custom sees.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512784 ] 

Jacques Le Roux commented on OFBIZ-1041:
----------------------------------------

It's finally done :o)

When I did the changes I was a bit puzzled because I found some new operators (at least ! and ??, see http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing_default) but no use ot them in OFBiz. So I was not sure if I it was a good practice to use them (it was late and I preferred to not take any risks). Something also that prevent me at 1st to do it is that the freemarker plugins in Eclipse (I use hudson.freemarker_ide_0.9.14) does not take care of them yet). But this operators look cool (who will prefer default?() against ! ;o) and finally thismorning I decided to begin to use them.

So I used this scheme (whitout unneded <#if (allowSolicitation)?exists > block around)
	<#if (()!"" == "Y")><option value="test">${uiLabelMap.CommonY}</option></#if>
	<#if (()!"" == "N")><option value="N">${uiLabelMap.CommonN}</option></#if>

This definitively closes the "various values in allowSolicitation variable break some screens" (https://issues.apache.org/jira/browse/OFBIZ-1041).
I used the same simple scheme everywhere but where no data was reloaded (like apparently in EditCategoryProducts.ftl and EditProductPromoRules.ftl)

In trunk rev. 556373

Release4.0 revision: 556376, manually merged from trunk revision 556373 for some files 
Conflicts resolved by hand :
  EditProductStorePaySetup.ftl
  applications/party/webapp/partymgr/party/editcontactmech.ftl
  genericaddress.ftl
  editShoppingList.ftl
  newcustomer.ftl



> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1041.
----------------------------------

    Resolution: Fixed

I finally commited a bunch of changes in trunk rev. 556172 and 556181 and in release4.0 rev. 556185  


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504427 ] 

David E. Jones commented on OFBIZ-1041:
---------------------------------------

Sorry, I didn't mean that literally in terms of "back-end" versus "front-end" applications. I meant that in terms of the back-end or supporting logic of an application as opposed to the front-end or user interface of an application.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504331 ] 

David E. Jones commented on OFBIZ-1041:
---------------------------------------

I'm totally with Si on this one, and it's important as this sort of thing has been broken by i18n efforts in the past.

You can show other things to the user, but the system should ALWAYS store Y or N, otherwise how are we going to write low level service, queries, etc, especially searching for things entered by users from different locales/languages?

This is very important.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512719 ] 

Adrian Crum commented on OFBIZ-1041:
------------------------------------

Jacques,

I reviewed your commits and they are still not quite right. Example:

Go to the edit contact mech page:

https://127.0.0.1:8443/partymgr/control/editcontactmech?partyId=DemoCustomer&contactMechId=9025

click on the Allow Solicitation drop down list and notice the choices. Then switch to the Russian locale (just below Romanian). Refresh the page and look at the drop down list's choices again. The current selection is Y and the other two are translated to Russian.

I committed the correct code (for this page only) in rev 556290. Check it out.


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504267 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

i.e. in crmsfa in  viewprofile.ftl you have 
            <#if (partyContactMech.allowSolicitation?default("") == "Y")><#assign solicit = uiLabelMap.CommonYes></#if>
            <#if (partyContactMech.allowSolicitation?default("") == "N")><#assign solicit = uiLabelMap.CommonNo></#if>
so if this field don't have values from (Y,N) nothing is displayed

second example is marketing list with emails and choosing email address by this field 

having this field with set of values Y,N,"" is good for system to indicate whether it is exactly YES or NOT
if you have multilingual employees that use russian (D,N) polish (T,N), english (Y,N)
set of those values will be D,T,Y,N so system will not be able to indicate what is YES and what is NOT




> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504349 ] 

David E. Jones commented on OFBIZ-1041:
---------------------------------------

Thanks Adrian, just after writing that while I was reading other email I wondered if I had read it backwards, and I think you're totally right that I did!

Anyway, hopefully my point is clear. It's great to internationalize what the user sees, but not the system values.

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504419 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

this select could look like this
      <select name="allowSolicitation">
        <#if (mechMap.partyContactMech.allowSolicitation)?exists >   
          <#if (mechMap.partyContactMech.allowSolicitation?default("") == "Y")><option value="Y">${uiLabelMap.CommonY}</option></#if>
          <#if (mechMap.partyContactMech.allowSolicitation?default("") == "N")><option value="N">${uiLabelMap.CommonN}</option></#if>
        </#if>
        <option value=""></option><option value="Y">${uiLabelMap.CommonY}</option><option value="N">${uiLabelMap.CommonN}</option>
      </select>

I'm not 100% sure that it'll  work without fix in updatePartyContactMech I've submited above.
as far as I remember there were problems with selects and values in options

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Si Chen reassigned OFBIZ-1041:
------------------------------

    Assignee: Si Chen

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512623 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

so it will not be fixed?

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504447 ] 

Krzysztof Podejma commented on OFBIZ-1041:
------------------------------------------

Adrian, your proposal doesn't use current value so if user wants change only phone number, he has to set allowSolitation field too.
If not, form will change Y to N. I think it is not user friendly and a little bit confusing.


> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504250 ] 

Si Chen commented on OFBIZ-1041:
--------------------------------

I don't know about this one.  For a Chinese user, for example, Y or N might not have any meaning.

Could you give me an example of the problem you see with using CommonY/CommonN?

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Assignee: Si Chen
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1041) various values in allowSolicitation variable break some screens

Posted by "Krzysztof Podejma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krzysztof Podejma updated OFBIZ-1041:
-------------------------------------

    Attachment: allowSolicitation.patch

> various values in allowSolicitation variable  break some screens
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-1041
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1041
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Krzysztof Podejma
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: allowSolicitation.patch
>
>
> in contact forms field allowSolicitation is set to uiLabelMap.CommonY or uiLabelMap.CommonN.
> it would be a good idea to force this value to Y or N because it is confusing if you use more than one language
> additionaly different values break forms in other apps like crmsfa
> please see my patch
> Krzysztof Podejma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.