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

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

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

Nicolas Malin (Jira)

     [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

     [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

    [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

     [ 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.

Reply | Threaded
Open this post in threaded view
|

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

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

     [ 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.

12