You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Ankush Upadhyay (JIRA)" <ji...@apache.org> on 2016/06/20 16:41:05 UTC

[jira] [Comment Edited] (OFBIZ-7518) Unable to create Product Store Roles from Party manager

    [ https://issues.apache.org/jira/browse/OFBIZ-7518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15339863#comment-15339863 ] 

Ankush Upadhyay edited comment on OFBIZ-7518 at 6/20/16 4:40 PM:
-----------------------------------------------------------------

I researched on this issue and found that this issue occurs only if PartyRole is not existed for the party with supplied roleTypeId. if the party is added to the role from Roles tab then functionality is working as expected.

For the fix we have following two options:
1. Render only those roles assigned to party instead of render all available roles from RoleType entity (here is the patch RenderPartyAssignedRolesInDropDown.patch).
2. We can call "ensurePartyRole" before ProductStoreRole creation service (Here is the patch: CreateProductStoreRole.patch).

I am attaching both the fix so that community can review and provide suggestion on the better fix of this issue.  


was (Author: ankush.upadhyay):
I researched on this issue and found that this issue occurs only if PartyRole is not existed for the party with supplied roleTypeId. if the party is added to the role from Roles tab then functionality is working as expected.

For the fix we have following two options:
1. Render only those roles assigned to party instead of render all available roles from RoleType entity.
2. We can call "ensurePartyRole" before ProductStoreRole creation service.

I am attaching both the fix so that community can review and provide suggestion on the better fix of this issue.  


> Unable to create Product Store Roles from Party manager
> -------------------------------------------------------
>
>                 Key: OFBIZ-7518
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7518
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Upcoming Branch
>            Reporter: Ankush Upadhyay
>         Attachments: CreateProductStoreRole.patch, ProductStoreRoleError.png, RenderPartyAssignedRolesInDropDown.patch
>
>
> System throws error while adding new product store role.
> Steps to reproduce:
> 1. Login to party manager and go to Company party profile page.
> 2. Navigate to Product Store Roles tab.
> 3. Try to create new product store role for any product store and any roleTypeId.
> 4. System should show violation of foreign key constraint error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)