[jira] [Comment Edited] (OFBIZ-4975) updatePortletSeqDragDrop is not working in PortalPage management

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

[jira] [Comment Edited] (OFBIZ-4975) updatePortletSeqDragDrop is not working in PortalPage management

Nicolas Malin (Jira)

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

Pierre Smits edited comment on OFBIZ-4975 at 5/18/19 8:38 AM:
--------------------------------------------------------------

Closing the ticket because one contributor not working on it is not the right way to go.

I have added the affected versions because the ticket was created around the available release branches  back then. We should investigate if later release branches and trunk are truly not affected.


was (Author: pfm.smits):
Closing the ticket because one contributor not working is not the right way to go.

I have added the affected versions because the ticket was created around the available release branches  back then. We should investigate if later release branches and trunk are truly not affected.

> updatePortletSeqDragDrop is not working in PortalPage management
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-4975
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4975
>             Project: OFBiz
>          Issue Type: Bug
>          Components: myportal
>    Affects Versions: Release Branch 13.07, Release Branch 14.12, Release Branch 15.12
>            Reporter: Olivier Heintz
>            Assignee: Erwan de FERRIERES
>            Priority: Minor
>         Attachments: OFBIZ-4975.patch
>
>
> When you try to change Portlet order in a PortalPage, most of the time it does'nt work.
> To show why, I start to change in minilang service, calculate attribute by a set
> {code}
>              <iterate entry="modifyPp" list="modifyPpList">
>                  <if-empty field="modifyPp.sequenceNum">
>                      <set field="modifyPp.sequenceNum" value="newSequenceNo"/>
>                      <else>
> -                        <calculate field="modifyPp.sequenceNum" type="Long">
> -                            <calcop operator="add" field="newSequenceNo">
> -                                <calcop operator="get" field="increase"/>
> -                            </calcop>
> -                        </calculate>
> -                        <calculate field="increase" type="Long">
> -                            <calcop operator="add" field="increase">
> -                                <calcop operator="get" field="increase"/>
> -                            </calcop>
> -                        </calculate>
> +                      <set field="modifyPp.sequenceNum" from="newSequenceNo+increase" />
> +                      <set field="increase" from="increase+increase" />
>                      </else>
>                  </if-empty>
>                  <store-value value-field="modifyPp"/>
>              </iterate>
> {code}
> the error was to not use a second field, the correct code should be
> {code}
>              <iterate entry="modifyPp" list="modifyPpList">
>                  <if-empty field="modifyPp.sequenceNum">
>                      <set field="modifyPp.sequenceNum" value="newSequenceNo"/>
>                      <else>
>                       <if-empty field="newValue">
>                           <set field="newValue" from="increase"/>
>                       </if-empty>
>                       <set field="modifyPp.sequenceNum" from="newSequenceNo+newValue" />
>                       <set field="newValue" from="newValue+increase"/>
>                      </else>
>                  </if-empty>
>                  <store-value value-field="modifyPp"/>
>              </iterate>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)