-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1121 from OneCommunityGlobal/development
Backend Release to Main [2.01]
- Loading branch information
Showing
32 changed files
with
2,733 additions
and
353 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# deleteTask Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successful deletion. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either no record is found in Task collection or some error occurs while saving the tasks. | ||
|
||
2. ✅ Returns status 403 if the request.body.requestor does not have `deleteTask` permission. | ||
|
||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# deleteTaskByWBS Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successful deletion. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either no record is found in Task collection or some error occurs while saving the tasks. | ||
|
||
2. ✅ Returns status 403 if the request.body.requestor does not have `deleteTask` permission. | ||
|
||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateAllParents Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on without performing an operation. | ||
|
||
> ## Negative case | ||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getTaskById Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successfully getting a taskById. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either req.params.id is missing or is `undefined` or if no task is found in Task collection. | ||
|
||
2. ✅ Returns status 500 if some error occurs. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getTasks Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successfully querying the Task collection. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 404 if any error occurs while querying the Task collection. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getTasksByUserId Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successfully getting the tasks. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if some error occurs. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getTasksForTeamsByUser Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successfully fetching teams data. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if some error occurs. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getWBSId Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successfully querying the WBS collection. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 404 if any error occurs while querying the WBS collection. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# importTask Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 201 on successfully creating and saving the new Task. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if any error occurs while saving the Task. | ||
|
||
2. ✅ Returns status 403 if request.body.requestor is missing permission for importTask. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateNum Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successful updation. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either request.body.fromNum request.body.toNum is missing or some error occurs while saving the tasks. | ||
|
||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# postTask Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 201 on successfully posting the new task. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either request.body.taskName is missing or request.body.isActive is missing or some error occurs while saving task or Wbs or project. | ||
|
||
2. ✅ Returns status 403 if request.body.requestor is missing permission `postTask`. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# sendReviewReq Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successful operation. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 500 if some error occurs. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# swap Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 201 on successfully updating. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either request.body.taskId1 is missing or request.body.taskId2 is missing or there is error while executing findById in Task or some error occurs while saving task. | ||
|
||
2. ✅ Returns status 403 if request.body.requestor is missing `swapTask` permission. | ||
|
||
3. ✅ Returns status 404 if some error occurs while executing find operation on Task collection. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateAllParents Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successful updation. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if some error occurs. - Not possible to check as per current structure | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateNum Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 200 on successfully updating. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either request.body.nums is missing or some error occurs while saving child task. | ||
|
||
2. ✅ Returns status 403 if request.body.requestor is missing `updateNum` permission. | ||
|
||
3. ✅ Returns status 404 if some error occurs while processing the child tasks. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateTask Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 201 on successfully updating. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 400 if either request.body.nums is missing or some error occurs while saving child task. | ||
|
||
2. ✅ Returns status 403 if request.body.requestor is missing `updateTask` permission. | ||
|
||
3. ✅ Returns status 404 if some error occurs while executing findOneAndUpdate operation on Task collection. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateTaskStatus Function | ||
|
||
> ## Positive case | ||
1. ✅ Returns status 201 on successful update operation. | ||
|
||
> ## Negative case | ||
1. ✅ Returns status 404 if some error occurs. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get Time Zone | ||
|
||
> ## Positive case | ||
1. ✅ Returns status code 200 and response data as follows: | ||
i. current location | ||
ii. timezone | ||
|
||
> ## Negative case | ||
1. ✅ Returns status code 403, if the user is not authorised. | ||
2. ✅ Returns status code 401, if the API key is missing. | ||
3. ✅ Returns status code 400, if the location is missing. | ||
4. ✅ Returns status code 404, if geocodeAPIEndpoint returns no results. | ||
5. ✅ Returns status code 500, if any other error occurs. | ||
|
||
> ## Edge case |
20 changes: 20 additions & 0 deletions
20
requirements/timeZoneAPIController/getTimeZoneProfileInitialSetup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get Time Zone | ||
|
||
> ## Positive case | ||
1. ✅ Returns status code 200 and response data as follows: | ||
i. current location | ||
ii. timezone | ||
|
||
> ## Negative case | ||
1. ✅ Returns status code 400, if the token is missing in the request body. | ||
2. ✅ Returns status code 403, if the no document exists in ProfileInitialSetupToken database with requested token. | ||
3. ✅ Returns status code 400, if the location is missing. | ||
4. ✅ Returns status code 404, if geocodeAPIEndpoint returns no results. | ||
5. ✅ Returns status code 500, if any other error occurs. | ||
|
||
> ## Edge case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.