Bug 1007489

Summary: Exception alert is shown after you add organization group with non-existent repository through REST API
Product: [Retired] JBoss BRMS Platform 6 Reporter: Sona Mala <smala>
Component: Business CentralAssignee: Mark Proctor <mproctor>
Status: CLOSED CURRENTRELEASE QA Contact: Sona Mala <smala>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: lpetrovi
Target Milestone: ER4   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:20:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Error from server.log
none
Screenshot - an error alert none

Description Sona Mala 2013-09-12 15:07:19 UTC
Created attachment 796910 [details]
Error from server.log

Description of problem:
If you use REST API for adding a new organization group and you use business-central application to create new repository into this group then you get exception into server.log and an error alert in GUI whenever you try to access to this repository by Project explorer.




Version-Release number of selected component (if applicable):
6.0.0 ER2 BPMS

How reproducible:


Steps to Reproduce:
1. add a new organization group by REST API, use command:
   $curl -X POST -u "admin:admin1234;" -H "Content-Type: application/json" -d '{"name":"newGroup","description":"My hello world repo","owner":"admin","repositories":["myRepository"]}' http://localhost:8080/business-central/rest/groups

(main point is that the repository 'myRepository' does not exist in .niogit)
2. check status of REST API that is success, use command:
    $curl -X GET -u "admin:admin1234;" -H "Content-Type: application/json" http://localhost:8080/business-central/rest/jobs/{jobID}

3. open business-central in your browser
4. add repository 'helloworld' to group 'newGroup' by GUI (Administranition/Repositories/New Repository)

5. be sure that new repository was created
6. switch to Project Authoring perspective
7. Access to group 'newGroup' or to repository 'helloworld' or switch to Technical view


Actual results:
Exception in server.log, Error alert in GUI. (exception and screenshot are attached)


Expected results:
1] GUI interaction without any error. 

2] In case that REST request is invalid then do not complete it. (unable to add non-existent repository into group by REST) Do not mark job as SUCCESS and do not add group into system. 

3] In case that current behaviour is expected (I hope that it is not expected behaviour) then make Error alert readable, something like "Group contains non-existent repository, create this repository or remove it from group"

Additional info:

Comment 1 Sona Mala 2013-09-12 15:11:58 UTC
Created attachment 796912 [details]
Screenshot - an error alert

Comment 3 Sona Mala 2013-10-23 08:57:46 UTC
Verified for ER4.

Command (in step 1) is not success. Job status is RESOURCE_NOT_EXIST. No group was added into system (checks in business-central/Administration perspective)

The system allows adding new group which contains just existing repositories. If you add a repository which does not exist then the job ends with status RESOURCE_NOT_EXIST.