*** red1 has quit IRC | 01:07 | |
*** Devastator_ has joined #idempiere | 03:28 | |
*** Devastator has quit IRC | 03:31 | |
*** jmpiloq__ has joined #idempiere | 05:17 | |
*** a42niem has joined #idempiere | 05:43 | |
*** norbertbede has quit IRC | 06:07 | |
*** jmpiloq__ has quit IRC | 06:21 | |
*** hieplq has joined #idempiere | 06:39 | |
*** norbertbede has joined #idempiere | 06:58 | |
*** KermitTheFragger has joined #idempiere | 07:40 | |
*** nmicoud has joined #idempiere | 07:47 | |
nmicoud | Hi @all Can someone give an example of the syntax which should be used for adding a day in schedulers (it has been implemented with https://idempiere.atlassian.net/browse/IDEMPIERE-1952) ? | 08:52 |
---|---|---|
*** is-mw has joined #idempiere | 09:07 | |
*** is-mw has quit IRC | 09:16 | |
*** is-mw has joined #idempiere | 09:17 | |
*** a42niem has quit IRC | 10:35 | |
*** Devastator_ has quit IRC | 10:37 | |
*** Devastator_ has joined #idempiere | 10:37 | |
*** Devastator_ is now known as Devastator | 10:37 | |
*** a42niem has joined #idempiere | 10:39 | |
*** hieplq has quit IRC | 12:49 | |
*** CarlosRuiz has joined #idempiere | 13:21 | |
*** ChanServ sets mode: +o CarlosRuiz | 13:21 | |
*** aguerra has joined #idempiere | 14:32 | |
aguerra | hello everydoby!!!! | 14:33 |
aguerra | Is possible to return a date from the script of the rules? | 14:37 |
*** CarlosRuiz has quit IRC | 15:04 | |
*** hieplq has joined #idempiere | 15:05 | |
*** hieplq has quit IRC | 15:12 | |
*** hieplq has joined #idempiere | 15:12 | |
*** aguerra has quit IRC | 15:14 | |
*** aguerra has joined #idempiere | 15:15 | |
aguerra | Is possible to return a date from the rules? | 15:17 |
*** CarlosRuiz has joined #idempiere | 15:20 | |
*** ChanServ sets mode: +o CarlosRuiz | 15:20 | |
hieplq | hi @CarlosRuiz, just notify IDEMPIERE-2244 is tested and IDEMPIERE-2389 fixed your comment. | 15:57 |
CarlosRuiz | thanks hieplq - I was thinking on an idea about how to ease our workflow | 15:57 |
hieplq | want confirm about IDEMPIERE-2497. wdyt it's ok to make new editor for category same Attribute | 15:57 |
aguerra | Is possible to return a date from the rules? | 15:58 |
hieplq | ah, about workflow. i will prefer to make patch step by step for each review and maintain, but you should take time to review soon. | 15:59 |
CarlosRuiz | I was thinking to open a fork for idempiere - called experimental | 16:00 |
hieplq | for IDEMPIERE-2389 i think merged to develope path will help it's tested more time than separate branch. | 16:01 |
hieplq | i will take time to fix any side effect. | 16:01 |
*** ocurieles has joined #idempiere | 16:01 | |
CarlosRuiz | and we can agree to give you commit permission on the experimental fork - my idea is that we evolve one agreed feature in a branch | 16:01 |
CarlosRuiz | and we set jenkins to compile that fork and demo.idempiere-erp.org to set a test server for the experimental - maybe we rename it to | 16:02 |
CarlosRuiz | experimental.idempiere.org - or something like that | 16:02 |
CarlosRuiz | to let people know that it can be broken | 16:02 |
CarlosRuiz | that way community can help us to test and we don't worry too much about broken things in experimental during development | 16:03 |
CarlosRuiz | I can give you access to the experimental server for you to update too | 16:03 |
hieplq | it's ok with me. in my repositories i also manage each big chang in a branch | 16:03 |
CarlosRuiz | I would just ask you that we communicate a lot - and work on one feature at a time there | 16:04 |
CarlosRuiz | I have two candidates to start - one - the lot of info windows changes that are stuck | 16:04 |
CarlosRuiz | and the other is ther 2389 | 16:05 |
hieplq | i just worry, make separate server make experimental isn't tested more time. | 16:06 |
CarlosRuiz | sorry - didn't understand | 16:06 |
hieplq | i mean, a bit people join to test experimental.idempiere.com | 16:07 |
CarlosRuiz | I guess we must announce in forums what is the feature in progress on experimental - and ask community to provide feedback and tests | 16:08 |
hieplq | ok. we can try with 2389. has a lot pending issue depend 2389 | 16:09 |
hieplq | about IDEMPIERE-2497. wdyt it's ok to make new editor for category same Attribute. | 16:11 |
hieplq | i can make it as plug-in but if it's worth, i will do in core and make patch. | 16:12 |
ocurieles | Hi, Guys i vote +1 for experimental Server :) | 16:15 |
CarlosRuiz | hieplq, don't know the details of 2497 - to enter in core it must be compatible with oracle too | 16:16 |
ocurieles | i can integrate a resource for contribute with @hieplq | 16:16 |
CarlosRuiz | hieplq, I'll try to set up the experimental fork+jenkins+test server on next wednesday meeting - and we can check there which ticket to start experimenting :-) | 16:19 |
hieplq | because at the moment find window seach in sub category, i think it's ok with 2497 | 16:19 |
CarlosRuiz | not info window - just info product - right? | 16:19 |
CarlosRuiz | ah I see | 16:20 |
CarlosRuiz | is not that as simple as making the FindWindow.getSubCategoryWhereClause recursive? | 16:20 |
Not-311d | [IDEMPIERE] MZI created IDEMPIERE-2535 Date material policy BUG on receipt | 16:21 |
Not-311d | [IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-2535 | 16:21 |
hieplq | search in sub category doing with all standard window, code check for product_category_id. | 16:21 |
CarlosRuiz | hmm - it seems recursove | 16:21 |
CarlosRuiz | recursive already | 16:21 |
hieplq | and don't working in other place (info window, paramater process,..) | 16:21 |
hieplq | yes. now to recursive, code is in "find window" i think make a editor for case recursive category is very good. it also simple by implement IWhereClauseEditor | 16:23 |
hieplq | @ocurieles experimental not just for me. it's for any big change, because welcome you :D | 16:24 |
CarlosRuiz | key for experimental - one big change at a time | 16:24 |
ocurieles | yes @hieplq i'm agree... | 16:25 |
CarlosRuiz | hieplq, I think that must be better to be started as plugin - you can use official IDs if you think it can land into core | 16:31 |
hieplq | ok. will do as that. | 16:32 |
hieplq | other issue want confirm, current, name of log scrip without date format yyyymmddhhmm, it's ok to append date info? | 16:32 |
ocurieles | WDYT about the attributes can be usable in other system functions without requiring product? | 16:34 |
CarlosRuiz | hieplq, didn't understand the question | 16:37 |
ocurieles | i'm thinking in Human Resources, surveys, Medical exams, all is configurable by attribute instance | 16:37 |
CarlosRuiz | I saw norbertbede was proposing attributes for document properties (in document management system) | 16:39 |
hieplq | in IDEMPIERE-2389 and IDEMPIERE-2244 i encounter a lot mistake relate to name of script file. reason i must manual rename script log. | 16:39 |
hieplq | so it's good when script log has date info with format yyyymmddhhmm | 16:40 |
hieplq | @aguerra quick find in code. i see in success case, rule script must return a empty string. | 16:42 |
hieplq | it's for callout case. other not sure. | 16:42 |
hieplq | search code relate to ScriptEngine will help you. please share your result by a wiki page if you has time. | 16:43 |
norbertbede | hi all | 16:45 |
CarlosRuiz | hi norbertbede | 16:49 |
CarlosRuiz | nmicoud, still there? | 16:49 |
CarlosRuiz | hieplq, the reason of the naming convention for migration script files is the ordering | 16:49 |
nmicoud | yes, but not for long | 16:50 |
CarlosRuiz | I think the scheduler variable parameter is something like | 16:50 |
CarlosRuiz | @#Date@+1d | 16:50 |
CarlosRuiz | just reading the code - not tested | 16:50 |
nmicoud | ahah ; i've put +d1 i think | 16:50 |
CarlosRuiz | or maybe @#Date+1d@ | 16:50 |
nmicoud | will try it | 16:50 |
CarlosRuiz | I see it also supports +1m or +1y | 16:50 |
CarlosRuiz | hieplq, the register_ function updates the last migration script applied in AD_System if the new script is greater than the last applied | 16:51 |
CarlosRuiz | so - the order is important there - some time ago somebody applied a script with the format yyyyddmm - and it stays on the "last migration script applied" for long time until we needed to make more migration scripts to clear it | 16:52 |
CarlosRuiz | not sure if that answer your question | 16:52 |
hieplq | so sad for my english :D. ok, let me ask again @CarlosRuiz. now "Log Migration Script" make file with name "migration_script_8070617395072719372_postgresql", i think it's best to change to migration_script_8070617395072719372_201503232356_postgresql | 17:01 |
hieplq | add 201503232356 help developer don't manual add date info, void mistake | 17:01 |
aguerra | @hieploq my case it using in Payroll concept, i am making a rule and trying to use " addOnlyBusinessDays() " | 17:05 |
aguerra | @hieplq my case it using in Payroll concept, i am making a rule and trying to use " addOnlyBusinessDays() " ... this work TimeUtil.addDays() but addOnlyBusinessDays() dosen'r work | 17:10 |
hieplq | what relate between use addOnlyBusinessDays and return date from rule? | 17:11 |
norbertbede | ocurieles you an help me give input related to DMS | 17:12 |
norbertbede | we are thinking really to start this. just need some question must be resolved related to core | 17:13 |
norbertbede | i can send you dms design to email | 17:13 |
aguerra | Returns start date + nbDays which cannot be saturday or sunday or non business days | 17:14 |
ocurieles | hi @norbertbede | 17:15 |
ocurieles | sure, my email is orlando.curieles@ingeint.ec | 17:15 |
ocurieles | @aguerra, this rule exist | 17:16 |
norbertbede | ok | 17:16 |
aguerra | what is the name? | 17:17 |
ocurieles | wait | 17:17 |
CarlosRuiz | hieplq, I use this script | 17:17 |
CarlosRuiz | getmig.sh http://pastebin.com/6X7BY0FZ | 17:17 |
CarlosRuiz | and this one | 17:18 |
CarlosRuiz | add_reg.sh http://pastebin.com/0W23WCPD | 17:18 |
norbertbede | + 1 for experimental fork. | 17:19 |
CarlosRuiz | add_reg.sh adds the registration line at the end of the scripts | 17:19 |
ocurieles | you can use a SQL into the rule @aguerra | 17:19 |
CarlosRuiz | getmig.sh looks at the /tmp folder and copies the migration scripts to the corresponding folder renaming it based on the parameter | 17:19 |
CarlosRuiz | I use it something like | 17:19 |
CarlosRuiz | getmig.sh IDEMPIERE-1256 | 17:19 |
aguerra | is not as easy as you think | 17:21 |
aguerra | In collective vacation | 17:21 |
CarlosRuiz | I understand when hieplq say about developer lazyness - that's an important characteristic for a good developer - I have lots of scripts to do repetitive tasks | 17:21 |
ocurieles | What do you need exactly ? | 17:22 |
aguerra | most of people return at the end of period but the other not | 17:22 |
hieplq | @CarlosRuiz thanks a lot for share. will copy your script and use it. but maybe sometime i even forgot to use it :D | 17:26 |
aguerra | other not, because they have more year (employee), so they return date no can be saturday or sunday | 17:33 |
*** KermitTheFragger has quit IRC | 17:34 | |
hieplq | hi @aguerra, you start with question "is possible to return a date from the rules?" but after that you mean can't use addOnlyBusinessDays() in rule. | 17:35 |
hieplq | what's exact your issue? | 17:35 |
aguerra | i'll try to use addOnlyBusinessDays() to return a date from the rules but doesn't work | 17:38 |
aguerra | i use this TimeUtil.addDays() in other rules and work | 17:41 |
nmicoud | CarlosRuiz : thanks for the tip - correct notation is @#Date@+1d ; gtg ; bye | 17:43 |
CarlosRuiz | great - bye | 17:43 |
aguerra | I'm no expert in java and I can be doing something wrong | 17:44 |
hieplq | you try TimeUtil.addDays() in other rule and it work, so try TimeUtil.addDays() in place addOnlyBusinessDays() don't work to find out what's reason | 17:44 |
hieplq | and what's your mean about "don't work"? any log or exception? | 17:45 |
aguerra | org.adempiere.exceptions.AdempiereException: Execution error | 17:46 |
aguerra | but this error is because i use addOnlyBusinessDays() | 17:47 |
aguerra | if i change for TimeUtil.addDays(), work | 17:48 |
hieplq | so answer for fisrt question is "it can". true? | 17:52 |
hieplq | relate error when call addOnlyBusinessDays need a debug for detail, error message is too bit info. | 17:53 |
hieplq | maybe reason is by addOnlyBusinessDays call sql function, maybe it's limit for security | 17:53 |
aguerra | i don't use sql function, | 17:54 |
aguerra | i use this rule type:JSR 223 Scripting APIs | 17:55 |
hieplq | i mean addOnlyBusinessDays use sql function. | 17:58 |
hieplq | not sure. i just guess | 17:59 |
aguerra | i am taking the info from http://www.globalqss.com/idempiere/2.1_20141110/javadoc/ | 18:01 |
aguerra | packages: org.compiere.util | 18:02 |
aguerra | Class TimeUtil | 18:02 |
*** norbertbede has quit IRC | 18:03 | |
*** hieplq has quit IRC | 18:04 | |
ocurieles | @aguerra, i Ask you again, what exactly you need ? | 18:08 |
aguerra | @ocurieles make a payroll concept, for collective vacation | 18:13 |
aguerra | most of people return at the end of period but the other not, because they have more year, so they return date no can be saturday or sunday | 18:15 |
ocurieles | ok you can read this rule: | 18:32 |
ocurieles | sConsultag = " AND (EXTRACT('dow' from d.dateg) = '0' or EXTRACT('dow' from d.dateg) = '6') "; | 18:32 |
ocurieles | String sConsulta = "" | 18:32 |
ocurieles | + "SELECT count(d.dateg) FROM" | 18:32 |
ocurieles | + "(SELECT cast(extract ('year' from timestamp '"+fechai | 18:32 |
ocurieles | +"')||'-' ||extract ('month' from timestamp '"+fechai | 18:32 |
ocurieles | +"')||'-' || generate_series(cast(extract('day' from timestamp '"+fechai | 18:32 |
ocurieles | +"')as int),cast(extract('day' from timestamp'"+fechaf | 18:32 |
ocurieles | +"')as int)) as date) as dateg ) d " | 18:32 |
ocurieles | +" WHERE EXTRACT('month' from d.dateg) = EXTRACT('month' from '"+fechai+"'::timestamp)"+sConsultag; | 18:33 |
ocurieles | int days = DB.getSQLValue(get_TrxName(),sConsulta,new Object[] {}); | 18:33 |
*** norbertbede has joined #idempiere | 18:37 | |
aguerra | with this you only count the saturday and sunday between date | 18:43 |
aguerra | and we need date of return of vacation but they can't saturday or sunday | 18:45 |
*** norbertbede has quit IRC | 18:52 | |
ocurieles | with this you can determine | 18:56 |
ocurieles | result = 0.0; | 18:57 |
ocurieles | Timestamp FechaIni=TimeUtil.getMonthFirstDay(_To); | 18:57 |
ocurieles | String fechai=getTimestampToString(FechaIni); | 18:57 |
ocurieles | String fechaf = getTimestampToString(_To); | 18:58 |
ocurieles | if (!_DateEnd.equals(TimeUtil.getDay(2999, 12, 31))){ | 18:58 |
ocurieles | if (_DateEnd.before(_To)) | 18:58 |
ocurieles | fechaf = getTimestampToString(_DateEnd); | 18:58 |
ocurieles | } | 18:58 |
ocurieles | String sConsultag = ""; | 18:58 |
ocurieles | sConsultag = " AND (EXTRACT('dow' from d.dateg) = '0' or EXTRACT('dow' from d.dateg) = '6') "; | 18:58 |
ocurieles | String sConsulta = "" | 18:58 |
ocurieles | + "SELECT count(d.dateg) FROM" | 18:58 |
ocurieles | + "(SELECT cast(extract ('year' from timestamp '"+fechai | 18:58 |
ocurieles | +"')||'-' ||extract ('month' from timestamp '"+fechai | 18:58 |
ocurieles | +"')||'-' || generate_series(cast(extract('day' from timestamp '"+fechai | 18:58 |
ocurieles | +"')as int),cast(extract('day' from timestamp'"+fechaf | 18:58 |
ocurieles | +"')as int)) as date) as dateg ) d " | 18:58 |
ocurieles | +" WHERE EXTRACT('month' from d.dateg) = EXTRACT('month' from '"+fechai+"'::timestamp)"+sConsultag; | 18:58 |
ocurieles | int days = DB.getSQLValue(get_TrxName(),sConsulta,new Object[] {}); | 18:58 |
ocurieles | if(days>0 && getConcept("CC_ULTIMA_SEMANA")==1) | 18:58 |
ocurieles | result=days; | 18:58 |
ocurieles | description = "Desde: "+fechai+", Hasta: "+fechaf; | 18:58 |
*** norbertbede has joined #idempiere | 19:05 | |
ocurieles | or you can edit the plugin for use addOnlyBusinessDays() | 19:11 |
aguerra | ok. thk | 19:21 |
aguerra | but it is more complex, thk @ocurieles | 19:24 |
ocurieles | are you using the idempiere 2.0 ? | 19:24 |
aguerra | 2.1 | 19:24 |
*** Devastator has quit IRC | 19:24 | |
*** Devastator has joined #idempiere | 19:25 | |
ocurieles | can you show me your rule code ? | 19:25 |
aguerra | my question is why i can use TimeUtil.addDays() and when i use addOnlyBusinessDays i get error? | 19:27 |
aguerra | just change TimeUtil.addDays() for add OnlyBusinessDays | 19:27 |
nmicoud | Hi aguerra. Please have a look there: https://idempiere.atlassian.net/browse/IDEMPIERE-2072 ; i fixed a NullPointerException error ; it can be related to your issue | 19:35 |
aguerra | yessssss!!!!!! | 19:37 |
aguerra | @nmicoud, so we need to include all that function?? | 19:39 |
aguerra | @nmicoud, how to include this patch? | 19:40 |
CarlosRuiz | so - is tested by aguerra ? | 19:40 |
aguerra | sorry @CarlosRuiz, i don't understand | 19:41 |
CarlosRuiz | I mean if you tested 2072 and it works - then I commit it | 19:42 |
aguerra | ahhhh!!! ok | 19:42 |
CarlosRuiz | thanks nmicoud | 19:42 |
aguerra | yes man!!! | 19:42 |
Not-311d | [iDempiere] CarlosRuiz_globalqss pushed 1 commit to release-2.1 [+0/-0/±1] https://bitbucket.org/idempiere/idempiere/commits/ | 19:42 |
CarlosRuiz | that fix was lost in the long backlog | 19:42 |
Not-311d | [iDempiere] nmicoud 25472aa - IDEMPIERE-2072 get number of non business days between 2 dates / fix NPE | 19:42 |
Not-311d | [IDEMPIERE] carlosruiz_globalqss updated IDEMPIERE-2072 status set to "Resolved" -assignee set to "Nicolas Micoud" -resolution set to "Fixed" | 19:42 |
nmicoud | :D | 19:42 |
Not-311d | [IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-2072 | 19:42 |
nmicoud | great :) | 19:42 |
ocurieles | result=0.0; | 19:44 |
ocurieles | Timestamp tiempo =null; | 19:44 |
ocurieles | tiempo = TimeUtil.addOnlyBusinessDays(_From, 15, getAD_Client_ID(), get_TrxName()); | 19:44 |
ocurieles | description = "Fecha de inicio mas 15 dias laborables" +tiempo; | 19:44 |
ocurieles | i tested this: | 19:44 |
ocurieles | and work fine in 2.1 | 19:44 |
aguerra | @nmicoud like this function other works?? | 19:45 |
aguerra | How to include the patch ??? | 19:46 |
*** ocuriele_ has joined #idempiere | 19:52 | |
*** alejandro has joined #idempiere | 19:53 | |
*** alejandro is now known as Guest49135 | 19:53 | |
*** ocurieles has quit IRC | 19:55 | |
*** Guest49135 is now known as aguerra_ | 19:56 | |
aguerra | @CarlosRuiz, How to include the patch? or Can i update from jenkins?? | 19:58 |
CarlosRuiz | yes - is included now | 19:59 |
aguerra | thk a lot!!! | 19:59 |
*** aguerra_ has quit IRC | 20:11 | |
*** aguerra_ has joined #idempiere | 20:12 | |
*** aguerra_ has quit IRC | 21:20 | |
aguerra | @CarlosRuiz, are u there?? | 21:29 |
CarlosRuiz | Hi aguerra | 21:29 |
aguerra | I can upgrade from 2.0 ?? | 21:31 |
aguerra | I have a client in idempiere 2.0 | 21:31 |
aguerra | and I will migrate to 2.1 on Semana Santa | 21:32 |
aguerra | bye!!! thk for all!!! | 21:40 |
CarlosRuiz | bye | 21:40 |
*** aguerra has quit IRC | 21:40 | |
*** jmpiloq__ has joined #idempiere | 21:45 | |
*** norbertbede has quit IRC | 21:50 | |
*** carlos__ has joined #idempiere | 21:56 | |
*** CarlosRuiz has quit IRC | 21:56 | |
*** carlos__ is now known as CarlosRuiz | 21:56 | |
*** ChanServ sets mode: +o CarlosRuiz | 21:56 | |
*** a42niem has quit IRC | 22:56 | |
*** norbertbede has joined #idempiere | 22:58 | |
*** nmicoud has quit IRC | 22:59 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!