#idempiere IRC log for Monday, 2015-03-23

*** red1 has quit IRC01:07
*** Devastator_ has joined #idempiere03:28
*** Devastator has quit IRC03:31
*** jmpiloq__ has joined #idempiere05:17
*** a42niem has joined #idempiere05:43
*** norbertbede has quit IRC06:07
*** jmpiloq__ has quit IRC06:21
*** hieplq has joined #idempiere06:39
*** norbertbede has joined #idempiere06:58
*** KermitTheFragger has joined #idempiere07:40
*** nmicoud has joined #idempiere07:47
nmicoudHi @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 #idempiere09:07
*** is-mw has quit IRC09:16
*** is-mw has joined #idempiere09:17
*** a42niem has quit IRC10:35
*** Devastator_ has quit IRC10:37
*** Devastator_ has joined #idempiere10:37
*** Devastator_ is now known as Devastator10:37
*** a42niem has joined #idempiere10:39
*** hieplq has quit IRC12:49
*** CarlosRuiz has joined #idempiere13:21
*** ChanServ sets mode: +o CarlosRuiz13:21
*** aguerra has joined #idempiere14:32
aguerrahello everydoby!!!!14:33
aguerraIs possible to return a date from the script of the rules?14:37
*** CarlosRuiz has quit IRC15:04
*** hieplq has joined #idempiere15:05
*** hieplq has quit IRC15:12
*** hieplq has joined #idempiere15:12
*** aguerra has quit IRC15:14
*** aguerra has joined #idempiere15:15
aguerraIs possible to return a date from the rules?15:17
*** CarlosRuiz has joined #idempiere15:20
*** ChanServ sets mode: +o CarlosRuiz15:20
hieplqhi @CarlosRuiz, just notify IDEMPIERE-2244 is tested and IDEMPIERE-2389 fixed your comment.15:57
CarlosRuizthanks hieplq - I was thinking on an idea about how to ease our workflow15:57
hieplqwant confirm about IDEMPIERE-2497. wdyt it's ok to make new editor for category same Attribute15:57
aguerraIs possible to return a date from the rules?15:58
hieplqah, 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
CarlosRuizI was thinking to open a fork for idempiere - called experimental16:00
hieplqfor IDEMPIERE-2389 i think merged to develope path will help it's tested more time than separate branch.16:01
hieplqi will take time to fix any side effect.16:01
*** ocurieles has joined #idempiere16:01
CarlosRuizand we can agree to give you commit permission on the experimental fork - my idea is that we evolve one agreed feature in a branch16:01
CarlosRuizand we set jenkins to compile that fork and demo.idempiere-erp.org to set a test server for the experimental - maybe we rename it to16:02
CarlosRuizexperimental.idempiere.org - or something like that16:02
CarlosRuizto let people know that it can be broken16:02
CarlosRuizthat way community can help us to test and we don't worry too much about broken things in experimental during development16:03
CarlosRuizI can give you access to the experimental server for you to update too16:03
hieplqit's ok with me. in my repositories i also manage each big chang in a branch16:03
CarlosRuizI would just ask you that we communicate a lot - and work on one feature at a time there16:04
CarlosRuizI have two candidates to start - one - the lot of info windows changes that are stuck16:04
CarlosRuizand the other is ther 238916:05
hieplqi just worry, make separate server make experimental isn't tested more time.16:06
CarlosRuizsorry - didn't understand16:06
hieplqi mean, a bit people join to test experimental.idempiere.com16:07
CarlosRuizI guess we must announce in forums what is the feature in progress on experimental - and ask community to provide feedback and tests16:08
hieplqok. we can try with 2389. has a lot pending issue depend 238916:09
hieplqabout IDEMPIERE-2497. wdyt it's ok to make new editor for category same Attribute.16:11
hieplqi can make it as plug-in but if it's worth, i will do in core and make patch.16:12
ocurielesHi, Guys i vote +1 for experimental Server :)16:15
CarlosRuizhieplq, don't know the details of 2497 - to enter in core it must be compatible with oracle too16:16
ocurielesi can integrate a resource for contribute with @hieplq16:16
CarlosRuizhieplq, 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
hieplqbecause at the moment find window seach in sub category, i think it's ok with 249716:19
CarlosRuiznot info window - just info product - right?16:19
CarlosRuizah I see16:20
CarlosRuizis not that as simple as making the FindWindow.getSubCategoryWhereClause recursive?16:20
Not-311d[IDEMPIERE] MZI created IDEMPIERE-2535 Date material policy BUG on receipt16:21
Not-311d[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-253516:21
hieplqsearch in sub category doing with all standard window, code check for product_category_id.16:21
CarlosRuizhmm - it seems recursove16:21
CarlosRuizrecursive already16:21
hieplqand don't working in other place (info window, paramater process,..)16:21
hieplqyes. 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 IWhereClauseEditor16:23
hieplq@ocurieles experimental not just for me. it's for any big change, because welcome you :D16:24
CarlosRuizkey for experimental - one big change at a time16:24
ocurielesyes @hieplq i'm agree...16:25
CarlosRuizhieplq, I think that must be better to be started as plugin - you can use official IDs if you think it can land into core16:31
hieplqok. will do as that.16:32
hieplqother issue want confirm, current, name of log scrip without date format yyyymmddhhmm, it's ok to append date info?16:32
ocurielesWDYT about the attributes can be usable in other system functions without requiring product?16:34
CarlosRuizhieplq, didn't understand the question16:37
ocurielesi'm thinking in Human Resources, surveys, Medical exams, all is configurable by attribute instance16:37
CarlosRuizI saw norbertbede was proposing attributes for document properties (in document management system)16:39
hieplqin 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
hieplqso it's good when script log has date info with format yyyymmddhhmm16:40
hieplq@aguerra quick find in code. i see in success case, rule script must return a empty string.16:42
hieplqit's for callout case. other not sure.16:42
hieplqsearch code relate to ScriptEngine will help you. please share your result by a wiki page if you has time.16:43
norbertbedehi all16:45
CarlosRuizhi norbertbede16:49
CarlosRuiznmicoud, still there?16:49
CarlosRuizhieplq, the reason of the naming convention for migration script files is the ordering16:49
nmicoudyes, but not for long16:50
CarlosRuizI think the scheduler variable parameter is something like16:50
CarlosRuiz@#Date@+1d16:50
CarlosRuizjust reading the code - not tested16:50
nmicoudahah ; i've put +d1 i think16:50
CarlosRuizor maybe @#Date+1d@16:50
nmicoudwill try it16:50
CarlosRuizI see it also supports +1m or +1y16:50
CarlosRuizhieplq, the register_ function updates the last migration script applied in AD_System if the new script is greater than the last applied16:51
CarlosRuizso - 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 it16:52
CarlosRuiznot sure if that answer your question16:52
hieplqso 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_postgresql17:01
hieplqadd 201503232356 help developer don't manual add date info, void mistake17: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 work17:10
hieplqwhat relate between use addOnlyBusinessDays and return date from rule?17:11
norbertbedeocurieles you an help me give input related to DMS17:12
norbertbedewe are thinking really to start this. just need some question must be resolved related to core17:13
norbertbedei can send you dms design to email17:13
aguerraReturns start date + nbDays which cannot be saturday or sunday or non business days17:14
ocurieleshi @norbertbede17:15
ocurielessure, my email is orlando.curieles@ingeint.ec17:15
ocurieles@aguerra, this rule exist17:16
norbertbedeok17:16
aguerrawhat is the name?17:17
ocurieleswait17:17
CarlosRuizhieplq, I use this script17:17
CarlosRuizgetmig.sh   http://pastebin.com/6X7BY0FZ17:17
CarlosRuizand this one17:18
CarlosRuizadd_reg.sh    http://pastebin.com/0W23WCPD17:18
norbertbede+ 1 for experimental fork.17:19
CarlosRuizadd_reg.sh    adds the registration line at the end of the scripts17:19
ocurielesyou can use a SQL into the rule @aguerra17:19
CarlosRuizgetmig.sh  looks at the /tmp folder and copies the migration scripts to the corresponding folder renaming it based on the parameter17:19
CarlosRuizI use it something like17:19
CarlosRuizgetmig.sh  IDEMPIERE-125617:19
aguerrais not as easy as you think17:21
aguerraIn collective vacation17:21
CarlosRuizI understand when hieplq say about developer lazyness - that's an important characteristic for a good developer   -  I have lots of scripts to do repetitive tasks17:21
ocurielesWhat do you need exactly ?17:22
aguerramost of people return at the end of period but the other not17:22
hieplq@CarlosRuiz thanks a lot for share. will copy your script and use it. but maybe sometime i even forgot to use it :D17:26
aguerraother not, because they have more year (employee), so they return date no can be saturday or sunday17:33
*** KermitTheFragger has quit IRC17:34
hieplqhi @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
hieplqwhat's exact your issue?17:35
aguerrai'll try to use addOnlyBusinessDays() to return a date from the rules but doesn't work17:38
aguerrai use this TimeUtil.addDays() in other rules and work17:41
nmicoudCarlosRuiz : thanks for the tip - correct notation is @#Date@+1d ; gtg ; bye17:43
CarlosRuizgreat - bye17:43
aguerraI'm no expert in java and I can be doing something wrong17:44
hieplqyou try TimeUtil.addDays() in other rule and it work, so try TimeUtil.addDays() in place addOnlyBusinessDays() don't work to find out what's reason17:44
hieplqand what's your mean about "don't work"? any log or exception?17:45
aguerraorg.adempiere.exceptions.AdempiereException: Execution error17:46
aguerrabut this error is because i use addOnlyBusinessDays()17:47
aguerraif i change for TimeUtil.addDays(), work17:48
hieplqso answer for fisrt question is "it can". true?17:52
hieplqrelate error when call addOnlyBusinessDays need a debug for detail, error message is too bit info.17:53
hieplqmaybe reason is by addOnlyBusinessDays call sql function, maybe it's limit for security17:53
aguerrai don't use sql function,17:54
aguerrai use this rule type:JSR 223 Scripting APIs17:55
hieplqi mean addOnlyBusinessDays use sql function.17:58
hieplqnot sure. i just guess17:59
aguerrai am taking the info from http://www.globalqss.com/idempiere/2.1_20141110/javadoc/18:01
aguerrapackages: org.compiere.util18:02
aguerraClass TimeUtil18:02
*** norbertbede has quit IRC18:03
*** hieplq has quit IRC18:04
ocurieles@aguerra, i Ask you again, what exactly you need ?18:08
aguerra@ocurieles make a payroll concept, for collective vacation18:13
aguerramost 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 sunday18:15
ocurielesok you can read this rule:18:32
ocurielessConsultag = " AND (EXTRACT('dow' from d.dateg) = '0' or EXTRACT('dow' from d.dateg) = '6') ";18:32
ocurielesString sConsulta = ""18:32
ocurieles+ "SELECT count(d.dateg) FROM"18:32
ocurieles+ "(SELECT cast(extract ('year' from timestamp '"+fechai18:32
ocurieles+"')||'-' ||extract ('month' from timestamp '"+fechai18:32
ocurieles+"')||'-' || generate_series(cast(extract('day' from timestamp '"+fechai18:32
ocurieles+"')as int),cast(extract('day' from timestamp'"+fechaf18: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
ocurielesint days = DB.getSQLValue(get_TrxName(),sConsulta,new Object[] {});18:33
*** norbertbede has joined #idempiere18:37
aguerrawith this you only count the saturday and sunday between date18:43
aguerraand we need date of return of vacation but they can't saturday or sunday18:45
*** norbertbede has quit IRC18:52
ocurieleswith this you can determine18:56
ocurielesresult = 0.0;18:57
ocurielesTimestamp FechaIni=TimeUtil.getMonthFirstDay(_To);18:57
ocurielesString fechai=getTimestampToString(FechaIni);18:57
ocurielesString fechaf = getTimestampToString(_To);18:58
ocurielesif (!_DateEnd.equals(TimeUtil.getDay(2999, 12, 31))){18:58
ocurielesif (_DateEnd.before(_To))18:58
ocurielesfechaf = getTimestampToString(_DateEnd);18:58
ocurieles}18:58
ocurielesString sConsultag = "";18:58
ocurielessConsultag = " AND (EXTRACT('dow' from d.dateg) = '0' or EXTRACT('dow' from d.dateg) = '6') ";18:58
ocurielesString sConsulta = ""18:58
ocurieles+ "SELECT count(d.dateg) FROM"18:58
ocurieles+ "(SELECT cast(extract ('year' from timestamp '"+fechai18:58
ocurieles+"')||'-' ||extract ('month' from timestamp '"+fechai18:58
ocurieles+"')||'-' || generate_series(cast(extract('day' from timestamp '"+fechai18:58
ocurieles+"')as int),cast(extract('day' from timestamp'"+fechaf18: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
ocurielesint days = DB.getSQLValue(get_TrxName(),sConsulta,new Object[] {});18:58
ocurielesif(days>0 && getConcept("CC_ULTIMA_SEMANA")==1)18:58
ocurieles     result=days;18:58
ocurielesdescription = "Desde: "+fechai+", Hasta: "+fechaf;18:58
*** norbertbede has joined #idempiere19:05
ocurielesor you can edit the plugin for use addOnlyBusinessDays()19:11
aguerraok. thk19:21
aguerrabut it is more complex, thk @ocurieles19:24
ocurielesare you using the idempiere 2.0 ?19:24
aguerra2.119:24
*** Devastator has quit IRC19:24
*** Devastator has joined #idempiere19:25
ocurielescan you show me your rule code ?19:25
aguerramy question is why i can use TimeUtil.addDays() and when  i use addOnlyBusinessDays i get error?19:27
aguerrajust change TimeUtil.addDays() for add OnlyBusinessDays19:27
nmicoudHi aguerra.  Please have a look there: https://idempiere.atlassian.net/browse/IDEMPIERE-2072 ; i fixed a NullPointerException error ; it can be related to your issue19:35
aguerrayessssss!!!!!!19:37
aguerra@nmicoud, so we need to include all that function??19:39
aguerra@nmicoud, how to include this patch?19:40
CarlosRuizso - is tested by aguerra  ?19:40
aguerrasorry @CarlosRuiz, i don't understand19:41
CarlosRuizI mean if you tested 2072 and it works - then I commit it19:42
aguerraahhhh!!! ok19:42
CarlosRuizthanks nmicoud19:42
aguerrayes 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
CarlosRuizthat fix was lost in the long backlog19:42
Not-311d[iDempiere] nmicoud 25472aa - IDEMPIERE-2072 get number of non business days between 2 dates / fix NPE19: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:D19:42
Not-311d[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-207219:42
nmicoudgreat :)19:42
ocurielesresult=0.0;19:44
ocurielesTimestamp tiempo =null;19:44
ocurielestiempo = TimeUtil.addOnlyBusinessDays(_From, 15, getAD_Client_ID(), get_TrxName());19:44
ocurielesdescription = "Fecha de inicio mas 15 dias laborables" +tiempo;19:44
ocurielesi tested this:19:44
ocurielesand work fine in 2.119:44
aguerra@nmicoud like this function other works??19:45
aguerraHow to include the patch ???19:46
*** ocuriele_ has joined #idempiere19:52
*** alejandro has joined #idempiere19:53
*** alejandro is now known as Guest4913519:53
*** ocurieles has quit IRC19:55
*** Guest49135 is now known as aguerra_19:56
aguerra@CarlosRuiz, How to include the patch? or Can i update from jenkins??19:58
CarlosRuizyes - is included now19:59
aguerrathk a lot!!!19:59
*** aguerra_ has quit IRC20:11
*** aguerra_ has joined #idempiere20:12
*** aguerra_ has quit IRC21:20
aguerra@CarlosRuiz, are u there??21:29
CarlosRuizHi aguerra21:29
aguerraI can upgrade from 2.0 ??21:31
aguerraI have a client in idempiere 2.021:31
aguerraand I will migrate to 2.1 on Semana Santa21:32
aguerrabye!!! thk for all!!!21:40
CarlosRuizbye21:40
*** aguerra has quit IRC21:40
*** jmpiloq__ has joined #idempiere21:45
*** norbertbede has quit IRC21:50
*** carlos__ has joined #idempiere21:56
*** CarlosRuiz has quit IRC21:56
*** carlos__ is now known as CarlosRuiz21:56
*** ChanServ sets mode: +o CarlosRuiz21:56
*** a42niem has quit IRC22:56
*** norbertbede has joined #idempiere22:58
*** nmicoud has quit IRC22:59

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!