You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Fabien Carrion (JIRA)" <ji...@apache.org> on 2007/09/17 23:31:43 UTC

[jira] Created: (OFBIZ-1249) To permit to

use the calculate
 function in the minilang services with Date objects.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

To permit to
use the calculate function in the minilang services with Date objects.
------------------------------------------------------------------------------------

                 Key: OFBIZ-1249
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
             Project: OFBiz
          Issue Type: New Feature
    Affects Versions: Release Branch 4.0
         Environment: all
            Reporter: Fabien Carrion
            Priority: Minor


This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Jacopo Cappellato commented on OFBIZ-1249:
------------------------------------------

This is a summary from the dev mailing list for a new Minilang operation:

<set-calendar field="toDate" from-field="fromDate"
  years="+1" months="+1" ... millis="+1"
  locale="parameters.locale" time-zone="parameters.timeZone"/>

For example:

<set-calendar field="tomorrowDate" from-field="nowTimestamp" days="1"/>



> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Closed: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Jacques Le Roux closed OFBIZ-1249.
----------------------------------

    Resolution: Fixed

I have commited this patch + the XSD part in trunk rev. 616292

Thanks to Adrian for the patch, to Fabien for suggesting the idea and to David and Jacopo who helped this idea to be implemented.

Please review, and comment if needed, the SXD part I have added.

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562442#action_12562442 ] 

Jacopo Cappellato commented on OFBIZ-1249:
------------------------------------------

What is the current status of this task?


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562557#action_12562557 ] 

Jacopo Cappellato commented on OFBIZ-1249:
------------------------------------------

Adrian,

this is great news. I guess that now we only have to add prepare the XSD for the new operation.



> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum commented on OFBIZ-1249:
------------------------------------

David & Others,

The patch supports the value attribute, I just forgot to include it in the syntax. It also supports the ${} macro in the locale and time-zone attributes.

So, the patch supports the following syntax:

<set-calendar field="toDate" from-field="fromDate" value="2007-12-31 15:47:00.000 | ${parameters.dateTime}"
  years="+1" months="+1" ... millis="+1" 
  period-align-start="day | week | month | year" 
  period-align-end="day | week | month | year" 
  locale="en | ${parameters.locale}" time-zone="GMT | ${parameters.timeZone}"/> 

Sorry about the confusion.


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum updated OFBIZ-1249:
-------------------------------

    Attachment: set_calendar.patch

set_calendar.patch is a quick-and-dirty stab at the new simple method. It compiles but it is untested. If it works on the first try - cool, commit it. Otherwise post comments here and I'll get back to it when I have more time.


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to

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

Adrian Crum commented on OFBIZ-1249:
------------------------------------

What is being calculated in this patch?


> To permit to
> ------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum commented on OFBIZ-1249:
------------------------------------

I'm thinking we could add one more attribute to this: align-start="day | week | month | year" to align the new date/time to the specified period.


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

Hi Fabien,

I have asked the dev ML if it was ok to commit this patch as is, here are some comments so far :

Chris Howe
This really needs to go through a Calendar object instead of being cast to a long.  Also, I don't think the current  element structure is best suited for the operations that would be most beneficial for date/time calculations

Adrian Crum
Date calculation would be a great addition to mini language. Maybe we should discuss how it would look in mini lang code, then an implementation could be submitted.

I propose you to join the discussion on ML or maybe to propose another implemtation (though for the later I wonder if at this stage we have suffciently discussed David suggestion about "other similar requirements")

Thanks


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to

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

Fabien Carrion commented on OFBIZ-1249:
---------------------------------------

The calculate method in the minilang plugin only lets somebody do calculation on
TYPE_DOUBLE, TYPE_FLOAT, TYPE_LONG, TYPE_INTEGER, TYPE_STRING, TYPE_BIG_DECIMAL

I add the way to calculate on a DATE object. I just convert the date to a long which is the quantity of seconds since 1979 and then it is possible to do any kind of calculation we want.

It is useful if we use it with the now-date-to-env function.

> To permit to
> ------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

Jacques: don't be too quick on this one please; we should do a design and requirements brainstorming discussion on the dev list before putting this in.

The main thing I'm wondering is if there are other similar requirements that could be satisfied by small changes in the design of this.

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Fabien Carrion updated OFBIZ-1249:
----------------------------------

    Attachment: calculate_date_diff.patch.gz

Changing to coding style convention

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum updated OFBIZ-1249:
-------------------------------

    Attachment: set_calendar.patch

Updated set_calendar.patch file. Patch has been tested. Still needs xsd file.


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

In my TODO list...

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Fabien Carrion updated OFBIZ-1249:
----------------------------------

    Attachment:     (was: calculate_date_diff.patch.gz)

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum updated OFBIZ-1249:
-------------------------------

    Attachment: set_calendar.patch

Updated patch. I spotted a bug while looking it over.

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Jacques Le Roux updated OFBIZ-1249:
-----------------------------------

    Summary: To permit to to calculate on a DATE object in minilang  (was: To permit to)

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Fabien Carrion updated OFBIZ-1249:
----------------------------------

    Attachment:     (was: calculate_date_diff.patch.gz)

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

Fabien,

Please could you refer to http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices to build your patches ?

Thanks

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

If I have weel understood, Adrian proposed in dev ML that the attribute "field=" could be optionnal, and also adjusters attributes (years="${year}"... millis="${millis}") . But there must be at least one of them (including "field=" in them, this is not clear to me ?)
I don't think a such a rule (optionnal but one fields rule) is already used in minilang.


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

Just a couple of thoughts:

It might be nice to have a "value" attribute, just like on the normal set element, that could be used to specify a string instead of a from-field name.

For the locale and time-zone attributes it would be more consistent with other things (and potentially more useful) to just use string values and use the ${} when variables are desired. There is a small performance overhead with that, but a few nano-seconds here and there shouldn't hurt anyone... ;) If we don't want to use string values for those two and suffix to the name to clarify the use would be good, something like "-field" or "-env".

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

I will try and add XSD and annotation

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

Fabien,

I'm sorry but you are still using aboslute pathes in your patches (at least this one). And which option of SVN (Subversion) are you using to produce a such patch ?

I mean having

diff -Naur lasala.old/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java lasala.new/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java
--- lasala.old/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java	2007-09-17 11:47:38.000000000 -0500
+++ lasala.new/release4.0/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java	2007-09-17 11:45:56.000000000 -0500

in place of something like


Index: applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
===================================================================
--- applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java	(revision 586768)
+++ applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java	(working copy)

Are you not using CVS to build your patches ?

Thanks for your work

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum commented on OFBIZ-1249:
------------------------------------

I forgot to mention, the new patch supports the following syntax:

<set-calendar field="toDate" from-field="fromDate"
  years="+1" months="+1" ... millis="+1"
  period-align-start="day | week | month | year"
  period-align-end="day | week | month | year"
  locale="parameters.locale" time-zone="parameters.timeZone"/>


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch, set_calendar.patch, set_calendar.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to

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

Adrian Crum updated OFBIZ-1249:
-------------------------------

    Affects Version/s:     (was: Release Branch 4.0)
                       SVN trunk
              Summary: To permit to  (was: To permit to
use the calculate function in the minilang services with Date objects.)

Changed version to Trunk since this is an improvement, not a bug fix.

> To permit to
> ------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch.gz
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Adrian Crum commented on OFBIZ-1249:
------------------------------------

I said that there must be at least one adjuster, otherwise the set-calendar operation doesn't make any sense.

The remark about "field=" being optional can be ignored. That was more clearly defined as others added their suggestions. "field=" will work just like the existing set operation.


> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Fabien Carrion updated OFBIZ-1249:
----------------------------------

    Attachment: calculate_date_diff.patch

Done with trunk version

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Priority: Minor
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Commented: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

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

Hi David,

No worries.

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Assigned: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Jacques Le Roux reassigned OFBIZ-1249:
--------------------------------------

    Assignee: Jacques Le Roux

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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


[jira] Updated: (OFBIZ-1249) To permit to to calculate on a DATE object in minilang

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

Marco Risaliti updated OFBIZ-1249:
----------------------------------

      Component/s: framework
    Fix Version/s: SVN trunk

> To permit to to calculate on a DATE object in minilang
> ------------------------------------------------------
>
>                 Key: OFBIZ-1249
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1249
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: all
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: calculate_date_diff.patch
>
>
> This patch lets use the calculate function in the minilang service function with java.util.Date and java.sql.Date object.

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