You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Nicolas Malin (JIRA)" <ji...@apache.org> on 2016/06/08 21:30:21 UTC
[jira] [Commented] (OFBIZ-7249) Error on removing scrum members
[ https://issues.apache.org/jira/browse/OFBIZ-7249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321478#comment-15321478 ]
Nicolas Malin commented on OFBIZ-7249:
--------------------------------------
Hi Anurag,
Yes it's not the good solution to delete ProductRole, but don't worries because the function deleteScrumResource hurt my eyes.
A PartyRole would be never remove if it's use on the system because you loose the historicist. So If you want correct this : Check when the role is use and expire the relation.
If you check the function end
{code}
<now-timestamp field="nowTimestamp" />
<entity-and entity-name="UserLoginSecurityGroup" list="userLoginSecurityGroups">
<field-map field-name="userLoginId" from-field="parameters.userLoginId"/>
<field-map field-name="groupId" from-field="parameters.groupId"/>
</entity-and>
<if-not-empty field="userLoginSecurityGroups">
<iterate entry="userLoginSecurityGroup" list="userLoginSecurityGroups">
<remove-value value-field="userLoginSecurityGroup"/>
</iterate>
</if-not-empty>
{code}
It's also not correct, why init nowtimestamp to didn't use and delete userLoginSecurityGroup instead of expire it ?
:) so the best solution is more complicated than delete each data
> Error on removing scrum members
> -------------------------------
>
> Key: OFBIZ-7249
> URL: https://issues.apache.org/jira/browse/OFBIZ-7249
> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/scrum
> Affects Versions: Release Branch 13.07, Release Branch 14.12, Trunk, Release Branch 15.12
> Reporter: Anurag Chandak
> Assignee: Anurag Chandak
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-7249.patch
>
>
> Steps to regenerate:
> - Go to Scrum --> Administration --> Scrum Members
> - Try to remove only those scrum members whose party and role type are similar to product members
> - The following error is shown:
> {code}
> The Following Errors Occurred:
> Error:Error doing entity-auto operation for entity PartyRole in service deletePartyRole: org.ofbiz.entity.GenericEntityException: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:PartyRole][partyId,SCRUMASTER(java.lang.String)][roleTypeId,SCRUM_MASTER(java.lang.String)] (SQL Exception while executing the following:DELETE FROM OFBIZ.PARTY_ROLE WHERE PARTY_ID=? AND ROLE_TYPE_ID=? (DELETE on table 'PARTY_ROLE' caused a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key (SCRUMASTER,SCRUM_MASTER). The statement has been rolled back.)) (Exception while deleting the following entity: [GenericEntity:PartyRole][partyId,SCRUMASTER(java.lang.String)][roleTypeId,SCRUM_MASTER(java.lang.String)] (SQL Exception while executing the following:DELETE FROM OFBIZ.PARTY_ROLE WHERE PARTY_ID=? AND ROLE_TYPE_ID=? (DELETE on table 'PARTY_ROLE' caused a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key (SCRUMASTER,SCRUM_MASTER). The statement has been rolled back.)))
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)