Bug 1007489 - Exception alert is shown after you add organization group with non-existent repository through REST API
Summary: Exception alert is shown after you add organization group with non-existent r...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER4
: 6.0.0
Assignee: Mark Proctor
QA Contact: Sona Mala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-12 15:07 UTC by Sona Mala
Modified: 2014-08-06 20:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:20:06 UTC
Type: Bug


Attachments (Terms of Use)
Error from server.log (9.30 KB, text/x-log)
2013-09-12 15:07 UTC, Sona Mala
no flags Details
Screenshot - an error alert (39.88 KB, image/png)
2013-09-12 15:11 UTC, Sona Mala
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.