Ok i did not see the unusual index of the PerfRreview too: which includes the employeeId and role. This is also not according the dataresource book. I would even suggest to take the employeeparty and role out of this key too and follow the general pattern that the perfReview entity has a single key field perfReviewId.
Thanks for commenting on this. Regards, Hans On Fri, 2011-01-14 at 09:59 +0100, Jacopo Cappellato wrote: > Hi Hans, > > could you please better explain what was the error and why you have decided > to modify the PerfReviewItem entity? > I am asking you this because, even if I don't know much about this area of > the data model, from what I understand: > - PerfReview is used to define an employee performance review; this is why we > have a primary key composed by the employee party id, its role and an index > (for the specific review) > - PerfReviewItem is used to provide details about a specific review (defined > above); this is why we had a primary key composed by the primary key of the > PerfReview entity and an additional subindex (perfReviewItemSeqId) > > I don't doubt that the existing services were not working, but I am wondering > if there was another way to fix them instead of altering the primary key of > the PerfReviewItem entity. > > Kind regards, > > Jacopo > > On Jan 14, 2011, at 9:40 AM, hans...@apache.org wrote: > > > Author: hansbak > > Date: Fri Jan 14 08:40:01 2011 > > New Revision: 1058891 > > > > URL: http://svn.apache.org/viewvc?rev=1058891&view=rev > > Log: > > made the employee review item work, corrected a completely wrong entity > > definition prefreviewitem, services now work again and added new type data. > > Added buttons to be able to select reveiw and item list NOTE: This change > > needs recreating of the PerfReviewItem index, the fields and format did not > > change, just the indexing > > > > Modified: > > ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml > > ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml > > ofbiz/trunk/applications/humanres/widget/CommonScreens.xml > > ofbiz/trunk/applications/humanres/widget/HumanresMenus.xml > > ofbiz/trunk/applications/humanres/widget/PerfReviewScreens.xml > > ofbiz/trunk/applications/humanres/widget/forms/PerfReviewForms.xml > > > > Modified: ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml?rev=1058891&r1=1058890&r2=1058891&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml (original) > > +++ ofbiz/trunk/applications/humanres/data/HumanResTypeData.xml Fri Jan 14 > > 08:40:01 2011 > > @@ -153,5 +153,17 @@ under the License. > > > > <EmplLeaveReasonType description="Medical" hasTable="N" parentTypeId="" > > emplLeaveReasonTypeId="Fever"/> > > <EmplLeaveReasonType description="Casual" hasTable="N" parentTypeId="" > > emplLeaveReasonTypeId="Personal Work"/> > > + > > + <PerfReviewItemType perfRatingTypeId="TECH" hasTable="N" > > description="Technical skills"/> > > + <PerfReviewItemType perfRatingTypeId="RESP" hasTable="N" > > description="Responsibility"/> > > + <PerfReviewItemType perfRatingTypeId="ATT" hasTable="N" > > description="Attitude"/> > > + <PerfReviewItemType perfRatingTypeId="COMM" hasTable="N" > > description="Communication skills"/> > > + <PerfReviewItemType perfRatingTypeId="JOBSAT" hasTable="N" > > description="Job Satisfaction"/> > > + > > + <PerfRatingType perfRatingTypeId="1" hasTable="N" description="Fails > > to Meet Expectations"/> > > + <PerfRatingType perfRatingTypeId="2" hasTable="N" > > description="Inconsistently Fulfills"/> > > + <PerfRatingType perfRatingTypeId="3" hasTable="N" > > description="Fulfilled Expectations"/> > > + <PerfRatingType perfRatingTypeId="4" hasTable="N" > > description="Frequently Exceeds"/> > > + <PerfRatingType perfRatingTypeId="5" hasTable="N" > > description="Consistently Exceeds"/> > > > > </entity-engine-xml> > > > > Modified: ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml?rev=1058891&r1=1058890&r2=1058891&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml (original) > > +++ ofbiz/trunk/applications/humanres/entitydef/entitymodel.xml Fri Jan 14 > > 08:40:01 2011 > > @@ -164,15 +164,13 @@ under the License. > > <entity entity-name="PerfReviewItem" > > package-name="org.ofbiz.humanres.ability" > > title="Performance Review Item Entity"> > > - <field name="employeePartyId" type="id-ne"></field> > > - <field name="employeeRoleTypeId" type="id"></field> > > <field name="perfReviewId" type="id-ne"></field> > > <field name="perfReviewItemSeqId" type="id-ne"></field> > > <field name="perfRatingTypeId" type="id"></field> > > <field name="perfReviewItemTypeId" type="id"></field> > > + <field name="employeePartyId" type="id-ne"></field> > > + <field name="employeeRoleTypeId" type="id"></field> > > <field name="comments" type="comment"></field> > > - <prim-key field="employeePartyId"/> > > - <prim-key field="employeeRoleTypeId"/> > > <prim-key field="perfReviewId"/> > > <prim-key field="perfReviewItemSeqId"/> > > <relation type="one" fk-name="PERF_RVITM_PFRV" > > rel-entity-name="PerfReview"> > > > > Modified: ofbiz/trunk/applications/humanres/widget/CommonScreens.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/CommonScreens.xml?rev=1058891&r1=1058890&r2=1058891&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/humanres/widget/CommonScreens.xml (original) > > +++ ofbiz/trunk/applications/humanres/widget/CommonScreens.xml Fri Jan 14 > > 08:40:01 2011 > > @@ -216,6 +216,7 @@ under the License. > > </condition> > > <widgets> > > <include-menu name="PartyBar" > > location="component://humanres/widget/HumanresMenus.xml"/> > > + <label style="h1" > > text="${uiLabelMap.HumanResPerfReview} ${uiLabelMap.CommonId} > > ${perfReviewId}"/> > > </widgets> > > </section> > > <decorator-section-include name="body"/> > > > > Modified: ofbiz/trunk/applications/humanres/widget/HumanresMenus.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/HumanresMenus.xml?rev=1058891&r1=1058890&r2=1058891&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/humanres/widget/HumanresMenus.xml (original) > > +++ ofbiz/trunk/applications/humanres/widget/HumanresMenus.xml Fri Jan 14 > > 08:40:01 2011 > > @@ -122,6 +122,11 @@ > > </menu> > > <menu name="PartyBar" default-menu-item-name="EditPerfReviewItems" > > default-selected-style="selected" > > type="simple" menu-container-style="button-bar tab-bar" > > selected-menuitem-context-field-name="tabButtonItem"> > > + <menu-item name="EditPerfReview" > > title="${uiLabelMap.HumanResPerfReview}"> > > + <link target="EditPerfReview"> > > + <parameter param-name="perfReviewId"/> > > + </link> > > + </menu-item> > > <menu-item name="EditPerfReviewItems" > > title="${uiLabelMap.HumanResEditPerfReviewItems}"> > > <link target="EditPerfReviewItems"> > > <parameter param-name="perfReviewId"/> > > > > Modified: ofbiz/trunk/applications/humanres/widget/PerfReviewScreens.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/PerfReviewScreens.xml?rev=1058891&r1=1058890&r2=1058891&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/humanres/widget/PerfReviewScreens.xml > > (original) > > +++ ofbiz/trunk/applications/humanres/widget/PerfReviewScreens.xml Fri Jan > > 14 08:40:01 2011 > > @@ -62,7 +62,7 @@ > > <entity-one entity-name="PerfReview" > > value-field="perfReview"/> > > </actions> > > <widgets> > > - <decorator-screen name="main-decorator" > > location="${parameters.mainDecoratorLocation}"> > > + <decorator-screen name="CommonPerfReviewDecorator" > > location="${parameters.mainDecoratorLocation}"> > > <decorator-section name="body"> > > <screenlet title="${uiLabelMap.CommonEdit} > > ${uiLabelMap.HumanResPerfReview}"> > > <section> > > > > Modified: ofbiz/trunk/applications/humanres/widget/forms/PerfReviewForms.xml > > URL: > > http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/PerfReviewForms.xml?rev=1058891&r1=1058890&r2=1058891&view=diff > > ============================================================================== > > --- ofbiz/trunk/applications/humanres/widget/forms/PerfReviewForms.xml > > (original) > > +++ ofbiz/trunk/applications/humanres/widget/forms/PerfReviewForms.xml Fri > > Jan 14 08:40:01 2011 > > @@ -101,7 +101,7 @@ under the License. > > <form name="AddPerfReviewItem" type="single" > > target="createPerfReviewItem" title="" > > header-row-style="header-row" default-table-style="basic-table"> > > <auto-fields-service service-name="createPerfReviewItem"/> > > - <field name="perfReviewId"><hidden/></field> > > + <field name="perfReviewId"><hidden > > value="${parameters.perfReviewId}"/></field> > > <field name="perfReviewItemSeqId"><ignored/></field> > > <field name="employeePartyId"><hidden/></field> > > <field name="employeeRoleTypeId"><hidden/></field> > > > > > -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates.