[jira] Created: (OFBIZ-1921) Sort related entities in ViewGeneric

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)
Sort related entities in ViewGeneric
------------------------------------

                 Key: OFBIZ-1921
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
    Affects Versions: SVN trunk
         Environment: ubuntu 8.04
            Reporter: Luke Prentice
            Priority: Minor


when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)

i propose sorting them in ViewEntity.groovy

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622808#action_12622808 ]

Luke Prentice commented on OFBIZ-1921:
--------------------------------------

i propose sorting on the constructed (title + relEntityName). patch below:

Index: framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy
===================================================================
--- framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy (revision 111)
+++ framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy (working copy)
@@ -308,6 +308,7 @@
     mapRelation.put("type", relation.getType());    
     mapRelation.put("title", relation.getTitle());
     mapRelation.put("relEntityName", relation.getRelEntityName());
+    mapRelation.put("sortName", relation.getTitle() + relation.getRelEntityName());
     mapRelation.put("relatedTable", relatedEntity.getEntityName());    
     mapRelation.put("relCreate", relCreate);
     
@@ -422,5 +423,5 @@
         }
     }
 }
-context.put("relationFieldList", relationFieldList);
+context.put("relationFieldList", UtilMisc.sortMaps(relationFieldList, UtilMisc.toList("sortName")));
 context.put("relSize", relationFieldList.size() + 2);


> Sort related entities in ViewGeneric
> ------------------------------------
>
>                 Key: OFBIZ-1921
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 8.04
>            Reporter: Luke Prentice
>            Priority: Minor
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
> i propose sorting them in ViewEntity.groovy

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1921:
---------------------------------

    Attachment: ViewGeneric.groovy.diff

here's the patch as an attachment.

> Sort related entities in ViewGeneric
> ------------------------------------
>
>                 Key: OFBIZ-1921
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 8.04
>            Reporter: Luke Prentice
>            Priority: Minor
>         Attachments: ViewGeneric.groovy.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
> i propose sorting them in ViewEntity.groovy

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

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622808#action_12622808 ]

lukeprentice edited comment on OFBIZ-1921 at 8/14/08 10:09 PM:
----------------------------------------------------------------

i propose sorting on the constructed (title + relEntityName). patch attached.

      was (Author: lukeprentice):
    i propose sorting on the constructed (title + relEntityName). patch below:

Index: framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy
===================================================================
--- framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy (revision 111)
+++ framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy (working copy)
@@ -308,6 +308,7 @@
     mapRelation.put("type", relation.getType());    
     mapRelation.put("title", relation.getTitle());
     mapRelation.put("relEntityName", relation.getRelEntityName());
+    mapRelation.put("sortName", relation.getTitle() + relation.getRelEntityName());
     mapRelation.put("relatedTable", relatedEntity.getEntityName());    
     mapRelation.put("relCreate", relCreate);
     
@@ -422,5 +423,5 @@
         }
     }
 }
-context.put("relationFieldList", relationFieldList);
+context.put("relationFieldList", UtilMisc.sortMaps(relationFieldList, UtilMisc.toList("sortName")));
 context.put("relSize", relationFieldList.size() + 2);

 

> Sort related entities in ViewGeneric
> ------------------------------------
>
>                 Key: OFBIZ-1921
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 8.04
>            Reporter: Luke Prentice
>            Priority: Minor
>         Attachments: ViewGeneric.groovy.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
> i propose sorting them in ViewEntity.groovy

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623180#action_12623180 ]

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

Good idea, but sorry, I can't see any differences in results (using https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
I did not look into code details

> Sort related entities in ViewGeneric
> ------------------------------------
>
>                 Key: OFBIZ-1921
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 8.04
>            Reporter: Luke Prentice
>            Priority: Minor
>         Attachments: ViewGeneric.groovy.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
> i propose sorting them in ViewEntity.groovy

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624274#action_12624274 ]

Luke Prentice commented on OFBIZ-1921:
--------------------------------------

the values in the drop-down list of related entities are unsorted unless my patch is applied. please compare the sort order of the related entities listed under "View" with current code, then with my patch.

the patch is very simple. 2 lines.

> Sort related entities in ViewGeneric
> ------------------------------------
>
>                 Key: OFBIZ-1921
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 8.04
>            Reporter: Luke Prentice
>            Priority: Minor
>         Attachments: ViewGeneric.groovy.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
> i propose sorting them in ViewEntity.groovy

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

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1921) Sort related entities in ViewGeneric

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1921.
----------------------------------

       Resolution: Fixed
    Fix Version/s: SVN trunk
         Assignee: Jacques Le Roux

Thanks Luke,

Yes sorry, I was not looking at the right place (I thought about relations in the relations screen), the word dropdown helped me.

Your patch is in trunk revision: 687614  


> Sort related entities in ViewGeneric
> ------------------------------------
>
>                 Key: OFBIZ-1921
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1921
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 8.04
>            Reporter: Luke Prentice
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: ViewGeneric.groovy.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> when viewing an entity the related entities under "View" are sorted in any meaningful way. (eg, https://localhost:8443/webtools/control/ViewGeneric?entityName=Party&partyId=10000)
> i propose sorting them in ViewEntity.groovy

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