Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TM v4.4.14 (Hotfix) #5093

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9fbfc18
Add embedded RapiD editor
willemarcel Jun 18, 2021
03c8473
Upgrade RapiD to v.1.1.8
Dec 21, 2021
257316b
Clean up unnecessary comments
dakotabenjamin Feb 11, 2022
ebc403a
Make sure reset all bad imagery only resets for tasks in the specifie…
Feb 28, 2022
fc7a25d
Add test for reset_all_bad_imagery and fix a few other tests
Feb 28, 2022
5b1b924
formatting
Feb 28, 2022
877b42f
update RapiD tag
Mar 1, 2022
fb77dae
Merge pull request #4934 from zlavergne/rapid
Aadesh-Baral Mar 2, 2022
602828c
Update issue templates
petya-kangalova Mar 3, 2022
259f16d
Merge pull request #5018 from zlavergne/fix/5011_reset-all-bad-imagery
Aadesh-Baral Mar 7, 2022
0dd890c
Update issue templates- Feature
petya-kangalova Mar 8, 2022
5b99230
Update bug_report.md
petya-kangalova Mar 8, 2022
6b56c5a
Updating contributing guidelines
petya-kangalova Mar 9, 2022
140bbd9
Update READ.ME
petya-kangalova Mar 9, 2022
9546bfa
Merge pull request #5030 from hotosm/petya-kangalova-patch-3
Aadesh-Baral Mar 13, 2022
e09ac6e
Merge pull request #5028 from hotosm/petya-kangalova-patch-2
Aadesh-Baral Mar 13, 2022
e15c917
Merge pull request #5026 from hotosm/petya-kangalova-patch-1
Aadesh-Baral Mar 13, 2022
181b9bc
fix typo in readme
Aadesh-Baral Mar 15, 2022
afaa382
Re-add images on Readme
Aadesh-Baral Mar 15, 2022
a826100
Merge pull request #5034 from hotosm/petya-kangalova-patch-4
Aadesh-Baral Mar 15, 2022
99fad57
Revert "Update READ.ME"
Aadesh-Baral Mar 15, 2022
475c476
Merge pull request #5041 from hotosm/revert-5034-petya-kangalova-patch-4
Aadesh-Baral Mar 15, 2022
8cffe34
Update Readme.md
Aadesh-Baral Mar 15, 2022
b3cf877
Move Codedeploy config to end of init script
dakotabenjamin Mar 18, 2022
aa832fc
Add wait time to init script
dakotabenjamin Mar 18, 2022
3e808a1
Merge pull request #5046 from hotosm/fix/cfn-init-codedeploy
dakotabenjamin Mar 21, 2022
2a0c07d
Merge pull request #4996 from hotosm/infra/cleanup-template
dakotabenjamin Mar 23, 2022
73cfb93
Add 'blocked' option to dropdown
HelNershingThapa Mar 15, 2022
dca6c7d
set-default-permission-for-validation-to-intermediate-and-advanced
Aadesh-Baral Mar 16, 2022
66d6996
Enable OpsGenie webhook by fixing yaml syntax
dakotabenjamin Mar 24, 2022
2691f1e
Merge pull request #5058 from hotosm/fix/circleci-webhook-syntax
dakotabenjamin Mar 28, 2022
5b58ada
Add cheatsheet under manuals
HelNershingThapa Mar 21, 2022
155207f
#5017 Support link added
ramyaragupathy Mar 2, 2022
0a8816b
Use anchor tag for external support link
HelNershingThapa Mar 21, 2022
ba95a47
Update menu items test case to include support portal link
HelNershingThapa Mar 21, 2022
88d5b4a
Change default editors while creating project
Aadesh-Baral Mar 29, 2022
532aa94
Improve task lock error messages (#5039)
HelNershingThapa Mar 31, 2022
fc454f1
Update text in 'Learn to Manage' section
HelNershingThapa Apr 5, 2022
d12c9fc
Fix support link in footer
HelNershingThapa Apr 5, 2022
3168de2
Bump marked from 2.1.3 to 4.0.12 in /frontend (#4975)
dependabot[bot] Apr 6, 2022
65bfcf6
Display error message for self intersecting AOI (#5076)
Aadesh-Baral Apr 10, 2022
ff7c955
Add tm error code document (#5077)
Aadesh-Baral Apr 10, 2022
ede0bab
Improve sorting for ‘My Tasks’ list (#5075)
Aadesh-Baral Apr 10, 2022
dbea2d2
Add common date range filters (#5065)
HelNershingThapa Apr 10, 2022
db71daf
Do not cache html files in the browser
dakotabenjamin Apr 8, 2022
89a6ae7
Fix cache-control directive value setting for html files
dakotabenjamin Apr 11, 2022
90b3c10
Bump sentry-sdk[flask] from 0.19.3 to 1.5.8
dependabot[bot] Mar 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
command: |
cd ${CIRCLE_WORKING_DIRECTORY}
mkdir ${CIRCLE_WORKING_DIRECTORY}/tests/backend/lint
# . ${CIRCLE_WORKING_DIRECTORY}/env/bin/activate
black --check manage.py backend tests migrations
flake8 manage.py backend tests migrations
- run:
Expand Down Expand Up @@ -211,7 +210,8 @@ jobs:
export TM_ENVIRONMENT=<< parameters.stack_name >>
yarn
CI=true GENERATE_SOURCEMAP=false yarn build
aws s3 sync build/ s3://tasking-manager-<< parameters.stack_name >>-react-app --delete
aws s3 sync build/ s3://tasking-manager-<< parameters.stack_name >>-react-app --delete --cache-control max-age=31536000
aws s3 cp s3://tasking-manager-<< parameters.stack_name >>-react-app s3://tasking-manager-<< parameters.stack_name >>-react-app --recursive --exclude "*" --include "*.html" --metadata-directive REPLACE --cache-control no-cache --content-type text/html
export DISTRIBUTION_ID=`aws cloudformation list-exports --output=text --query "Exports[?Name=='tasking-manager-<< parameters.stack_name >>-cloudfront-id-${AWS_REGION}'].Value"`
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*"
workflows:
Expand Down Expand Up @@ -252,7 +252,7 @@ workflows:
filters:
branches:
only:
- fix/sentry-environments
- fix/cfn-init-codedeploy
requires:
- build
stack_name: "test"
Expand All @@ -263,7 +263,7 @@ workflows:
filters:
branches:
only:
- fix/sentry-environments
- fix/cfn-init-codedeploy
requires:
- build
context: tasking-manager-staging
Expand Down Expand Up @@ -334,4 +334,4 @@ workflows:
context: tasking-manager-tm4-production
notify:
webhooks:
-url: https://api.opsgenie.com/v1/json/circleci?apiKey=$OPSGENIE_API
- url: https://api.opsgenie.com/v1/json/circleci?apiKey=$OPSGENIE_API
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: 'Type: Bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
64 changes: 62 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
directory: "/"
schedule:
interval: daily
time: "11:00"
time: "13:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: python-dotenv
Expand All @@ -30,7 +30,7 @@ updates:
directory: "/frontend"
schedule:
interval: daily
time: "11:00"
time: "13:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: "@testing-library/user-event"
Expand Down Expand Up @@ -141,6 +141,16 @@ updates:
- 2.4.21
- 2.4.22
- 2.4.23

- dependency-name: react-datepicker
versions:
- 3.7.0
- dependency-name: reactjs-popup
versions:
- 2.0.4
- dependency-name: ini
versions:
- 1.3.8
- dependency-name: "@formatjs/intl-relativetimeformat"
versions:
- 8.0.4
Expand Down Expand Up @@ -260,3 +270,53 @@ updates:
- dependency-name: react-placeholder
versions:
- 4.1.0
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: python-dotenv
versions:
- 0.15.0
- 0.16.0
- 0.17.0
- dependency-name: alembic
versions:
- 1.5.5
- 1.5.6
- 1.5.7
- dependency-name: sentry-sdk[flask]
versions:
- 0.20.3
- dependency-name: greenlet
versions:
- 1.0.0
- dependency-name: gevent
versions:
- 21.1.2
- dependency-name: oauthlib
versions:
- 3.1.0
- dependency-name: bleach
versions:
- 3.3.0
- dependency-name: flask-oauthlib
versions:
- 0.9.6
- dependency-name: flask-cors
versions:
- 3.0.10
- dependency-name: attrs
versions:
- 20.3.0
- dependency-name: werkzeug
versions:
- 1.0.1
- dependency-name: black
versions:
- 20.8b1
- dependency-name: geojson
versions:
- 2.5.0
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
[![TM Backend on Quay](https://quay.io/repository/hotosm/tasking-manager/status "Tasking Manager Backend Build")](https://quay.io/repository/hotosm/tasking-manager)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hotosm_tasking-manager&metric=alert_status)](https://sonarcloud.io/dashboard?id=hotosm_tasking-manager)

The most popular tool for teams to coordinate mapping on OpenStreetMap.

[<img src="screenshot.jpg" />](./screenshot.jpg)

With this web application an area of interest can be defined and divided up into smaller tasks that can be completed rapidly. It shows which areas need to be mapped and which areas need a review for quality assurance. You can see the tool in action: log into the widely used [HOT Tasking Manager](https://tasks.hotosm.org/) and start mapping.
The most popular tool for teams to coordinate mapping on OpenStreetMap. With this web application an area of interest can be defined and divided up into smaller tasks that can be completed rapidly. It shows which areas need to be mapped and which areas need a review for quality assurance. You can see the tool in action: log into the widely used [HOT Tasking Manager](https://tasks.hotosm.org/) and start mapping.

[<img src="./docs/assets/project-view.gif" />](./docs/assets/project-view.gif)

This is Free and Open Source Software. You are welcome to use the code and set up your own instance. The Tasking Manager has been initially designed and built by and for the [Humanitarian OpenStreetMap Team](https://www.hotosm.org/), and is nowadays used by many communities and organizations.

## Get involved!

* Check our [Code of conduct](./docs/code_of_conduct.md)
* Get familiar with our [contributor guidelines](./docs/contributing.md)
* Join the [working groups](./docs/working-groups.md)
* Help us to [translate the user interface](./docs/contributing-translation.md)
* Start by reading our [Code of conduct](./docs/code_of_conduct.md)
* Get familiar with our [contributor guidelines](./docs/contributing.md) explaining the different ways in which you can support this project! We need your help!
* Join the Tasking Manager Collective Meet up- an opportunity to meet other Tasking Manager contributors- details coming shortly!


## Developers

Expand Down
15 changes: 9 additions & 6 deletions backend/api/annotations/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get(self, project_id: int, annotation_type: str = None):
ProjectService.exists(project_id)
except NotFound as e:
current_app.logger.error(f"Error validating project: {str(e)}")
return {"Error": "Project not found"}, 404
return {"Error": "Project not found", "SubCode": "NotFound"}, 404

try:
if annotation_type:
Expand All @@ -52,7 +52,7 @@ def get(self, project_id: int, annotation_type: str = None):
)
return annotations.to_primitive(), 200
except NotFound:
return {"Error": "Annotations not found"}, 404
return {"Error": "Annotations not found", "SubCode": "NotFound"}, 404

def post(self, project_id: int, annotation_type: str):
"""
Expand Down Expand Up @@ -128,10 +128,10 @@ def post(self, project_id: int, annotation_type: str):
)
except NotFound:
current_app.logger.error("Invalid token")
return {"Error": "Invalid token"}, 500
return {"Error": "Invalid token", "SubCode": "NotFound"}, 500
else:
current_app.logger.error("No token supplied")
return {"Error": "No token supplied"}, 500
return {"Error": "No token supplied", "SubCode": "NotFound"}, 500

try:
annotations = request.get_json() or {}
Expand All @@ -142,7 +142,7 @@ def post(self, project_id: int, annotation_type: str):
ProjectService.exists(project_id)
except NotFound as e:
current_app.logger.error(f"Error validating project: {str(e)}")
return {"Error": "Project not found"}, 404
return {"Error": "Project not found", "SubCode": "NotFound"}, 404

task_ids = [t["taskId"] for t in annotations["tasks"]]

Expand All @@ -159,7 +159,10 @@ def post(self, project_id: int, annotation_type: str):
)
except DataError as e:
current_app.logger.error(f"Error creating annotations: {str(e)}")
return {"Error": "Error creating annotations"}, 500
return {
"Error": "Error creating annotations",
"SubCode": "InvalidData",
}, 400

return project_id, 200

Expand Down
31 changes: 15 additions & 16 deletions backend/api/campaigns/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def get(self, campaign_id):
campaign = CampaignService.get_campaign_as_dto(campaign_id, 0)
return campaign.to_primitive(), 200
except NotFound:
return {"Error": "No campaign found"}, 404
return {"Error": "No campaign found", "SubCode": "NotFound"}, 404
except Exception as e:
error_msg = f"Campaign GET - unhandled error: {str(e)}"
current_app.logger.critical(error_msg)
return {"Error": error_msg}, 500
return {"Error": error_msg, "SubCode": "InternalServerError"}, 500

@token_auth.login_required
def patch(self, campaign_id):
Expand Down Expand Up @@ -129,27 +129,27 @@ def patch(self, campaign_id):
raise ValueError("User not a Org Manager")
except ValueError as e:
error_msg = f"CampaignsRestAPI PATCH: {str(e)}"
return {"Error": error_msg}, 403
return {"Error": error_msg, "SubCode": "UserNotPermitted"}, 403

try:
campaign_dto = CampaignDTO(request.get_json())
campaign_dto.validate()
except DataError as e:
current_app.logger.error(f"error validating request: {str(e)}")
return str(e), 400
return {"Error": str(e), "SubCode": "InvalidData"}, 400

try:
campaign = CampaignService.update_campaign(campaign_dto, campaign_id)
return {"Success": "Campaign {} updated".format(campaign.id)}, 200
except NotFound:
return {"Error": "Campaign not found"}, 404
return {"Error": "Campaign not found", "SubCode": "NotFound"}, 404
except ValueError:
error_msg = "Campaign PATCH - name already exists"
return {"Error": error_msg}, 409
return {"Error": error_msg, "SubCode": "NameExists"}, 409
except Exception as e:
error_msg = f"Campaign PATCH - unhandled error: {str(e)}"
current_app.logger.critical(error_msg)
return {"Error": error_msg}, 500
return {"Error": error_msg, "SubCode": "InternalServerError"}, 500

@token_auth.login_required
def delete(self, campaign_id):
Expand Down Expand Up @@ -197,18 +197,18 @@ def delete(self, campaign_id):
raise ValueError("User not a Org Manager")
except ValueError as e:
error_msg = f"CampaignsRestAPI DELETE: {str(e)}"
return {"Error": error_msg}, 403
return {"Error": error_msg, "SubCode": "UserNotPermitted"}, 403

try:
campaign = CampaignService.get_campaign(campaign_id)
CampaignService.delete_campaign(campaign.id)
return {"Success": "Campaign deleted"}, 200
except NotFound:
return {"Error": "Campaign not found"}, 404
return {"Error": "Campaign not found", "SubCode": "NotFound"}, 404
except Exception as e:
error_msg = f"Campaign DELETE - unhandled error: {str(e)}"
current_app.logger.critical(error_msg)
return {"Error": error_msg}, 500
return {"Error": error_msg, "SubCode": "InternalServerError"}, 500


class CampaignsAllAPI(Resource):
Expand All @@ -232,7 +232,7 @@ def get(self):
except Exception as e:
error_msg = f"User GET - unhandled error: {str(e)}"
current_app.logger.critical(error_msg)
return {"Error": error_msg}, 500
return {"Error": error_msg, "SubCode": "InternalServerError"}, 500

@token_auth.login_required
def post(self):
Expand Down Expand Up @@ -298,22 +298,21 @@ def post(self):
raise ValueError("User not a Org Manager")
except ValueError as e:
error_msg = f"CampaignsAllAPI POST: {str(e)}"
return {"Error": error_msg}, 403
return {"Error": error_msg, "SubCode": "UserNotPermitted"}, 403

try:
campaign_dto = NewCampaignDTO(request.get_json())
campaign_dto.validate()
except DataError as e:
current_app.logger.error(f"error validating request: {str(e)}")
return str(e), 400
return {"Error": str(e), "SubCode": "InvalidData"}, 400

try:
campaign = CampaignService.create_campaign(campaign_dto)
return {"campaignId": campaign.id}, 200
except ValueError as e:
error_msg = f"Campaign POST - {str(e)}"
return {"Error": error_msg}, 409
return {"Error": str(e).split("-")[1], "SubCode": str(e).split("-")[0]}, 409
except Exception as e:
error_msg = f"Campaign POST - unhandled error: {str(e)}"
current_app.logger.critical(error_msg)
return {"Error": error_msg}, 500
return {"Error": error_msg, "SubCode": "InternalServerError"}, 500
Loading