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

Update/9.2.0 #520

Merged
merged 1,247 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
1247 commits
Select commit Hold shift + click to select a range
2ccfd9f
Add contact search to broadcasts
ericnewcomer Jun 27, 2024
089227d
Fix not releasing template translations when channel released
rowanseymour Jun 27, 2024
ba6934f
Merge pull request #5329 from nyaruka/template_trans_delete_pt1
rowanseymour Jun 27, 2024
097c7a5
Update CHANGELOG.md for v9.1.161
rowanseymour Jun 27, 2024
2d78850
Add migration to release translations for released channels
rowanseymour Jun 27, 2024
864d957
Merge pull request #5331 from nyaruka/template_trans_delete_pt2
rowanseymour Jun 27, 2024
f0d42c1
Make templatetranslation locale non-null
rowanseymour Jun 27, 2024
a7dbe8f
Merge pull request #5332 from nyaruka/trans_locale_not_null
rowanseymour Jun 27, 2024
c617c73
Change template translation syncing to enforce uniqueness over channe…
rowanseymour Jun 27, 2024
ce4233a
Update CHANGELOG.md for v9.1.162
rowanseymour Jun 27, 2024
bedc81f
Don't create fake external ids for templates
rowanseymour Jun 27, 2024
dddfc3e
Add data migration to remove duplicate template translations
rowanseymour Jun 27, 2024
b797e24
Add unique constraint on template translations
rowanseymour Jun 27, 2024
4a52b02
Merge pull request #5333 from nyaruka/trans_by_channel_and_locale_pt1
rowanseymour Jun 27, 2024
0ddaddf
Merge branch 'main' into trans_by_channel_and_locale_pt2
rowanseymour Jun 27, 2024
6fa461f
Update CHANGELOG.md for v9.1.163
rowanseymour Jun 27, 2024
3e9dd0f
Rework remaining mailroom client methods
rowanseymour Jun 27, 2024
3de7299
Merge branch 'main' into final_mr_client_reorg
rowanseymour Jun 27, 2024
35c5ad0
Merge pull request #5334 from nyaruka/trans_by_channel_and_locale_pt2
rowanseymour Jun 27, 2024
9abdb8a
Update CHANGELOG.md for v9.1.164
rowanseymour Jun 27, 2024
87ea5e5
Merge branch 'main' into trans_by_channel_and_locale_pt3
rowanseymour Jun 27, 2024
147ff1e
Merge pull request #5330 from nyaruka/final_mr_client_reorg
rowanseymour Jun 27, 2024
06831f8
Merge pull request #5335 from nyaruka/trans_by_channel_and_locale_pt3
rowanseymour Jun 27, 2024
877c7cb
Update CHANGELOG.md for v9.1.165
rowanseymour Jun 27, 2024
f3c5e44
Switch broadcast tests to use contact search
ericnewcomer Jun 27, 2024
c5a8b67
Cover some validation cases
ericnewcomer Jun 27, 2024
dbfdbc8
Merge branch 'main' into broadcast-targeting
ericnewcomer Jun 27, 2024
85dfec6
Tweak logging for failure during classifier syncing
rowanseymour Jun 27, 2024
4e6cee7
Remove unused OmniboxField
ericnewcomer Jun 27, 2024
1480412
Merge branch 'main' into broadcast-targeting
ericnewcomer Jun 27, 2024
de45e38
Merge pull request #5328 from nyaruka/broadcast-targeting
ericnewcomer Jun 27, 2024
8a8aa0a
Update CHANGELOG.md for v9.1.166
ericnewcomer Jun 27, 2024
b4f5b36
Fix external links within spa container
ericnewcomer Jun 28, 2024
3e9f633
Disallow empty recipient targeting
ericnewcomer Jun 28, 2024
04f0fca
Merge pull request #5336 from nyaruka/external-link
rowanseymour Jun 28, 2024
aec84ab
Merge pull request #5337 from nyaruka/contact-search-tweak
rowanseymour Jun 28, 2024
b675ed4
Update CHANGELOG.md for v9.1.167
rowanseymour Jun 28, 2024
d0a77f6
Fix empty contact search with query present
ericnewcomer Jun 28, 2024
e564717
Don't sync classifiers in suspended orgs
rowanseymour Jun 28, 2024
1ad3b5d
Merge branch 'dont_sync_suspended_org_classifiers'
rowanseymour Jun 28, 2024
8890159
Update CHANGELOG.md for v9.1.168
ericnewcomer Jun 28, 2024
48791c6
Fix globals list template and move annotate_usage into DependencyMixin
rowanseymour Jul 1, 2024
ada1039
Add new template list and read pages and remove old channel specific …
rowanseymour Jul 1, 2024
bcf4728
Fix globals list template and move annotate_usage into DependencyMixin
rowanseymour Jul 1, 2024
884b008
Merge pull request #5342 from nyaruka/globals_list_fix
rowanseymour Jul 1, 2024
f7a0491
Merge branch 'main' into template_ui_v2
rowanseymour Jul 1, 2024
73dc325
Add template log menu item to channel read page for channel types tha…
rowanseymour Jul 1, 2024
d50a256
Add Broadcast.template_variables
rowanseymour Jul 1, 2024
22ab23f
Remove old unused code for queueing broadcasts
rowanseymour Jul 1, 2024
a8d39a9
Merge pull request #5343 from nyaruka/bcast_template_variables
rowanseymour Jul 1, 2024
2e742e9
Merge branch 'main' into template_ui_v2
rowanseymour Jul 1, 2024
2eb7bc5
Merge pull request #5338 from nyaruka/template_ui_v2
rowanseymour Jul 2, 2024
798131d
Use python 3.11.x
norkans7 Jul 2, 2024
ceae326
Merge pull request #5320 from nyaruka/py-3.11
rowanseymour Jul 2, 2024
b935a00
Use tilde python version spec
rowanseymour Jul 2, 2024
b05382a
Update CHANGELOG.md for v9.1.169
rowanseymour Jul 2, 2024
d61b9b8
poetry update
rowanseymour Jul 2, 2024
72263d7
Merge pull request #5345 from nyaruka/update_deps
rowanseymour Jul 2, 2024
72d8edd
Update some major versions
rowanseymour Jul 2, 2024
feb7dc1
Merge pull request #5346 from nyaruka/update_deps
rowanseymour Jul 2, 2024
24a56a9
Update dev deps
rowanseymour Jul 2, 2024
1f8c0f7
Merge branch 'main' into update_deps
rowanseymour Jul 2, 2024
af74733
Merge pull request #5347 from nyaruka/update_deps
rowanseymour Jul 2, 2024
59a1640
Don't allow template localization
ericnewcomer Jul 2, 2024
c1fa426
Merge pull request #5348 from nyaruka/rm-wa-l18n
rowanseymour Jul 3, 2024
db1083c
Remove no longer needed task to sync stale Android relayers
rowanseymour Jul 3, 2024
5ec7d5d
Merge pull request #5349 from nyaruka/remove_old_sync_task
rowanseymour Jul 3, 2024
7e390fe
Update CHANGELOG.md for v9.1.170
rowanseymour Jul 3, 2024
be27617
Update payload for queueing a bradocast
rowanseymour Jul 3, 2024
abbc17d
Merge pull request #5350 from nyaruka/update_bcast_queue_payload
rowanseymour Jul 3, 2024
fdeafec
Update CHANGELOG.md for v9.1.171
rowanseymour Jul 3, 2024
9d692ea
Remove deprecated broadcast.template_state field on mailroom queue pa…
rowanseymour Jul 3, 2024
ca6aa2e
Merge pull request #5351 from nyaruka/remove_bcast_template_state
rowanseymour Jul 3, 2024
c51ef84
Add templates to broadcasts
ericnewcomer Jul 3, 2024
f348507
Merge branch 'main' into bcast-templates
ericnewcomer Jul 3, 2024
d03a490
Handle broadcasts without templates
ericnewcomer Jul 3, 2024
6722b95
Add broadcast template tests
ericnewcomer Jul 4, 2024
098b2f7
Missed broadcast test from move
ericnewcomer Jul 4, 2024
6a30f75
Remove cruft
ericnewcomer Jul 4, 2024
f2a08d9
Merge pull request #5352 from nyaruka/bcast-templates
rowanseymour Jul 4, 2024
cb29296
Update CHANGELOG.md for v9.1.172
rowanseymour Jul 4, 2024
e6202e5
Don't give option to send now on bcast update
ericnewcomer Jul 4, 2024
8b48c26
Don't allow bcast update to send now
ericnewcomer Jul 4, 2024
efbf2ef
Merge pull request #5353 from nyaruka/hide_send_now
rowanseymour Jul 4, 2024
1d01761
Add internal API endpoint for searching locations by level and name
rowanseymour Jul 4, 2024
c071427
Merge branch 'main' into locations_search_api
rowanseymour Jul 4, 2024
67aca0c
Only return required fields (admin boundaries have large geometry fie…
rowanseymour Jul 4, 2024
7a6e6f9
Only give agent users API access to locations listing
rowanseymour Jul 5, 2024
10a49ce
Fix test for boundaries API endpoint
rowanseymour Jul 5, 2024
6524764
Add Msg.is_android field
rowanseymour Jul 5, 2024
97265c6
Merge pull request #5354 from nyaruka/locations_search_api
rowanseymour Jul 5, 2024
fe8186d
Change Channel.is_android to be a property to match Msg.is_android
rowanseymour Jul 5, 2024
e3a39e7
Merge pull request #5355 from nyaruka/msg_is_android
rowanseymour Jul 5, 2024
dc3cc3d
Merge branch 'main' into remove_old_bcast_code
rowanseymour Jul 5, 2024
dea4fdc
Update CHANGELOG.md for v9.1.173
rowanseymour Jul 5, 2024
bc041ec
Merge pull request #5344 from nyaruka/remove_old_bcast_code
rowanseymour Jul 5, 2024
e7dd6a2
Fix updating scheduled broadcasts
rowanseymour Jul 5, 2024
b2961fa
Merge pull request #5358 from nyaruka/bcast_fix
rowanseymour Jul 5, 2024
6533eef
Update CHANGELOG.md for v9.1.174
rowanseymour Jul 5, 2024
1c0d929
Make send_when optional when updating broadcasts
ericnewcomer Jul 5, 2024
cc5700f
Merge pull request #5359 from nyaruka/fix-bcast-update
rowanseymour Jul 5, 2024
3235a29
Update CHANGELOG.md for v9.1.175
rowanseymour Jul 5, 2024
cd0b5c6
Hard delete template translations that no longer exist on the channel…
rowanseymour Jul 5, 2024
d12d578
Merge pull request #5360 from nyaruka/hard_delete_translations
rowanseymour Jul 5, 2024
84c5b70
Update Template to a TembaModel
rowanseymour Jul 5, 2024
7e4ae64
Fix tests
rowanseymour Jul 5, 2024
0dd8c37
Merge pull request #5361 from nyaruka/template_tembamodel
rowanseymour Jul 8, 2024
675e9c6
Update CHANGELOG.md for v9.1.176
rowanseymour Jul 8, 2024
ed1ae76
Hard delete remaining soft-deleted template translations
rowanseymour Jul 8, 2024
dac35cc
Merge pull request #5364 from nyaruka/delete_inactive_translations
rowanseymour Jul 8, 2024
0a8a04e
Update CHANGELOG.md for v9.1.177
rowanseymour Jul 8, 2024
7e7e454
Allow broadcast creation with zero matches
ericnewcomer Jul 9, 2024
e18d2fa
Merge pull request #5365 from nyaruka/allow-proceed-on-empty
ericnewcomer Jul 9, 2024
21bb06b
Update CHANGELOG.md for v9.1.178
ericnewcomer Jul 9, 2024
ecdeb34
Stop writing to TemplateTranslation.is_active and make nullable
rowanseymour Jul 10, 2024
f76d1a1
Add db constraint to ensure contact status is valid
rowanseymour Jul 10, 2024
a3fea1f
Keep FCM ID in channel config when soft deleting the channel
norkans7 Jul 10, 2024
c9e0037
Stop filtering on TemplateTranslation.is_active
rowanseymour Jul 10, 2024
6bb6f1f
Merge pull request #5366 from nyaruka/remove_translations_is_active_pt1
rowanseymour Jul 10, 2024
060654f
Merge pull request #5367 from nyaruka/android-release-keep-fcmid
rowanseymour Jul 10, 2024
8abe42b
Update CHANGELOG.md for v9.1.179
rowanseymour Jul 10, 2024
44a465f
Allow creation of contacts with non-active statuses
rowanseymour Jul 10, 2024
eef6b0a
Tweak wording on template list page
rowanseymour Jul 10, 2024
4e38279
Fix dashboard workspace data
norkans7 Jul 10, 2024
ca9e0b5
Add Template.base_translation
rowanseymour Jul 10, 2024
fa2873b
Drop no longer used is_active field from TemplateTranslation
rowanseymour Jul 10, 2024
f47b9ce
Merge pull request #5368 from nyaruka/contact_status_constraint
rowanseymour Jul 10, 2024
1edbfab
Merge pull request #5372 from nyaruka/remove_trans_is_active_pt2
rowanseymour Jul 10, 2024
d45c822
Update CHANGELOG.md for v9.1.180
rowanseymour Jul 10, 2024
6788f2c
Merge branch 'main' into template_base_translation
rowanseymour Jul 10, 2024
86a3416
Merge pull request #5371 from nyaruka/template_base_translation
rowanseymour Jul 10, 2024
920fa06
Merge pull request #5369 from nyaruka/create_with_status
rowanseymour Jul 10, 2024
a6a7d83
Simplify graph generation code
rowanseymour Jul 10, 2024
2990590
Merge pull request #5370 from nyaruka/fix-dashboard
rowanseymour Jul 10, 2024
9177364
Update CHANGELOG.md for v9.1.181
rowanseymour Jul 10, 2024
91fea8c
Expose Template.base_translation on API endpoint
rowanseymour Jul 10, 2024
19789bf
Fix template syncing when channel gives us invalid template data
rowanseymour Jul 10, 2024
c9f5a38
Locations API endpoint should allow searching on the path
rowanseymour Jul 10, 2024
e7ba0c9
Merge pull request #5375 from nyaruka/locations_search_tweak
rowanseymour Jul 10, 2024
8e6ef85
Merge pull request #5374 from nyaruka/template_sync_fix
rowanseymour Jul 10, 2024
6f3e763
Update CHANGELOG.md for v9.1.182
rowanseymour Jul 10, 2024
bd7ad3d
Merge branch 'main' into expose_base_translation
rowanseymour Jul 10, 2024
c1e2d66
Use dropdowns for location fields
ericnewcomer Jul 11, 2024
ed372ac
Merge pull request #5376 from nyaruka/better-location-fields
ericnewcomer Jul 11, 2024
fcb09b8
Update CHANGELOG.md for v9.1.183
ericnewcomer Jul 11, 2024
4375e82
Use dropdowns for location fields
ericnewcomer Jul 11, 2024
c382403
Merge pull request #5377 from nyaruka/better-location-fields
ericnewcomer Jul 11, 2024
efb33a1
Update CHANGELOG.md for v9.1.184
ericnewcomer Jul 11, 2024
ff95e11
Fix dashboard menu link permission
norkans7 Jul 11, 2024
e3e8950
Replace telegram library by requests use
norkans7 Jul 11, 2024
6b12c55
Remove python-telegram-bot
norkans7 Jul 11, 2024
18c9c53
Update deps
norkans7 Jul 11, 2024
324f985
Merge pull request #5378 from nyaruka/fix-dashbaord-link-perm
rowanseymour Jul 11, 2024
d7b0820
Merge pull request #5379 from nyaruka/update-telegram
rowanseymour Jul 11, 2024
69a9fa1
Remove no longer needed elastic service from CI tests
rowanseymour Jul 11, 2024
143b004
Merge pull request #5380 from nyaruka/update-deps
rowanseymour Jul 11, 2024
e59e03f
Merge pull request #5373 from nyaruka/expose_base_translation
rowanseymour Jul 11, 2024
ba35316
Merge pull request #5381 from nyaruka/ci_tweak
rowanseymour Jul 11, 2024
bd612a5
Update CHANGELOG.md for v9.1.185
rowanseymour Jul 11, 2024
753a8a1
Ensure we choose a new base for a template whenever an existing base …
rowanseymour Jul 11, 2024
868d47f
Merge pull request #5382 from nyaruka/template_update_base
rowanseymour Jul 11, 2024
876b6d3
Exclude emprty templates from list, and show base translation apart o…
rowanseymour Jul 11, 2024
5a941aa
Fix handling of POSTs to API docs
rowanseymour Jul 11, 2024
5699c71
Merge pull request #5383 from nyaruka/template_ui_translations
rowanseymour Jul 11, 2024
64fac10
Merge pull request #5384 from nyaruka/api_fix
rowanseymour Jul 11, 2024
bad612a
Update CHANGELOG.md for v9.1.186
rowanseymour Jul 11, 2024
83b9ad9
Rewrite more tests to use TembaTest.create_template
rowanseymour Jul 11, 2024
072c242
Fix test
rowanseymour Jul 11, 2024
b1f26ad
Update mailroom_db for latest template changes
rowanseymour Jul 11, 2024
3b8d117
Add templates to broadcasts
ericnewcomer Jul 11, 2024
24c348b
Add new boolean fields to TemplateTranslation model to determine whet…
rowanseymour Jul 11, 2024
27bcc42
Add template to create unit test
ericnewcomer Jul 12, 2024
278886f
Merge pull request #5386 from nyaruka/enable-bcast-templates
ericnewcomer Jul 12, 2024
09b9272
Update CHANGELOG.md for v9.1.187
ericnewcomer Jul 12, 2024
d2a0f95
Clean cruft
rowanseymour Jul 12, 2024
2184c6c
Merge pull request #5385 from nyaruka/templatetrans_is_supported
rowanseymour Jul 12, 2024
ab549df
Update CHANGELOG.md for v9.1.188
rowanseymour Jul 12, 2024
a8aff7c
Data migration to populate TemplateTranslation.is_supported and is_co…
rowanseymour Jul 12, 2024
72d9cd7
Fix mailroom_db
rowanseymour Jul 12, 2024
a4d2b96
Merge pull request #5387 from nyaruka/populate_new_trans_fields
rowanseymour Jul 12, 2024
eaf1e32
Update CHANGELOG.md for v9.1.189
rowanseymour Jul 12, 2024
1fd1814
Show template translation problems as errors on template read page
rowanseymour Jul 12, 2024
4d10176
Add new template statuses and stop using fake "unsupported" status
rowanseymour Jul 12, 2024
d1030f8
Update format of templates on API endpoint
rowanseymour Jul 12, 2024
1cf102e
Replace TemplateTranslation.STATUS_UNSUPPORTED completely
rowanseymour Jul 12, 2024
cad118d
Fix padding for broadcast schedule update
ericnewcomer Jul 12, 2024
5045560
Merge pull request #5392 from nyaruka/broadacst-update-spacing
ericnewcomer Jul 12, 2024
5fa5819
Update CHANGELOG.md for v9.1.190
ericnewcomer Jul 12, 2024
6f447e0
Merge pull request #5390 from nyaruka/templates_api_update
rowanseymour Jul 15, 2024
e932d7c
Merge branch 'main' into translation_errors
rowanseymour Jul 15, 2024
04ff684
Fix deactivating a legacy WhatsApp channel
rowanseymour Jul 15, 2024
9c02d1c
Merge pull request #5388 from nyaruka/translation_errors
rowanseymour Jul 15, 2024
9420de6
Merge branch 'main' into template_statuses
rowanseymour Jul 15, 2024
a286262
Merge branch 'main' into template_statuses
rowanseymour Jul 15, 2024
1d33f94
Merge pull request #5393 from nyaruka/wa_deactivate_fix
rowanseymour Jul 15, 2024
fd8395a
Update CHANGELOG.md for v9.1.191
rowanseymour Jul 15, 2024
b01de02
Merge pull request #5389 from nyaruka/template_statuses
rowanseymour Jul 15, 2024
f1d1e8c
Update CHANGELOG.md for v9.1.192
rowanseymour Jul 15, 2024
a9c2e44
Merge branch 'main' into template_statuses_pt2
rowanseymour Jul 15, 2024
56197ec
Merge pull request #5391 from nyaruka/template_statuses_pt2
rowanseymour Jul 15, 2024
ef74dd2
Update CHANGELOG.md for v9.1.193
rowanseymour Jul 15, 2024
83570a4
Make exceptions more specific
rowanseymour Jul 15, 2024
ef65342
Merge pull request #5394 from nyaruka/exceptions_cleanup
rowanseymour Jul 15, 2024
712c201
Remove old code for getting message created_by from broadcasts
rowanseymour Jul 15, 2024
17b8923
Merge pull request #5395 from nyaruka/remove_old_ticket_bcast_code
rowanseymour Jul 15, 2024
fa2c9be
Add Broadcast.node_uuid field
rowanseymour Jul 15, 2024
990eed7
Merge pull request #5396 from nyaruka/bcast_to_node_pt1
rowanseymour Jul 15, 2024
1ac8da1
Update CHANGELOG.md for v9.1.194
rowanseymour Jul 15, 2024
20c854a
Move broadcast.html into msgs/includes
rowanseymour Jul 15, 2024
3d8a006
Fix not showing query on broadcast recipients list and add node_uuid
rowanseymour Jul 15, 2024
b2cbf69
Fix rendering of exclusions on broadcasts
rowanseymour Jul 15, 2024
9fdad6f
Fix query broadcast creation and update
ericnewcomer Jul 16, 2024
d14331f
Tweak creation of broadcasts again
rowanseymour Jul 16, 2024
e7a6295
Fix setting a template on a new broadcast
rowanseymour Jul 16, 2024
50fde3d
Remove special error handling for broadcast to node that resolves to …
rowanseymour Jul 16, 2024
12fe82f
Fix saving exclusions on updated broadcasts
rowanseymour Jul 16, 2024
41a8781
Merge pull request #5397 from nyaruka/bcast_ui_tweak
rowanseymour Jul 16, 2024
b64f0c4
Update CHANGELOG.md for v9.1.195
rowanseymour Jul 16, 2024
03c96e5
Add data migration to trim old broadcasts to nodes that resulted in v…
rowanseymour Jul 16, 2024
742a191
Fix rendering of flow starts for deleted flows
rowanseymour Jul 16, 2024
2e4623c
Merge pull request #5398 from nyaruka/trim_old_bcasts_to_nodes
rowanseymour Jul 16, 2024
bf7c27d
Merge pull request #5399 from nyaruka/flow_start_deleted_flow_fix
rowanseymour Jul 16, 2024
8fd656f
Add __repr__ to more models and tweak existing ones for consistency
rowanseymour Jul 16, 2024
046f6d4
Merge pull request #5400 from nyaruka/__repr__
rowanseymour Jul 16, 2024
10f6fa9
Update CHANGELOG.md for v9.1.196
rowanseymour Jul 16, 2024
bdf9e1d
Allow variables on attachments in templates
ericnewcomer Jul 17, 2024
0eec13f
Merge pull request #5401 from nyaruka/attach-vars
rowanseymour Jul 17, 2024
83a2121
Update CHANGELOG.md for v9.1.198
rowanseymour Jul 17, 2024
74c0c62
Tweak menu items for msg views and flow results
rowanseymour Jul 17, 2024
ef2f918
Merge pull request #5402 from nyaruka/menu_tweaks
rowanseymour Jul 17, 2024
43ff83f
Simplify permissions in flows app
rowanseymour Jul 17, 2024
bd52a94
Merge pull request #5403 from nyaruka/simpler_perms
rowanseymour Jul 17, 2024
6cd560d
Update README.md
rowanseymour Jul 17, 2024
0f70d31
Update CHANGELOG.md for v9.2.0
rowanseymour Jul 17, 2024
c029862
Update WENI-CHENGELOG to 1.7.31-rapidpro-9.0.0
lucaslinhares Dec 13, 2024
3a38cae
Merge branch 'main' of https://github.com/Ilhasoft/rapidpro
lucaslinhares Dec 13, 2024
c642478
Update Rapidpro version to 9.1.198
lucaslinhares Dec 16, 2024
3016832
Remove weni password forget
lucaslinhares Dec 16, 2024
d5224a3
Add orgs.org_whatsapp_cloud_connect permission to administrators group
lucaslinhares Dec 17, 2024
b5ef2fa
Add org_whatsapp_cloud_connect in permissions group
lucaslinhares Dec 17, 2024
7e366a6
Remove org_whatsapp_cloud_connect in permissions group
lucaslinhares Dec 17, 2024
85eaccd
Add orgs.user_update in administrators permissions
lucaslinhares Dec 17, 2024
e65e555
Add UserCRUDL in orgs urls
lucaslinhares Dec 17, 2024
4cfed1f
Adjust channel tests
lucaslinhares Dec 17, 2024
7b18198
Merge tag 'v9.2.0' of https://github.com/nyaruka/rapidpro into update…
lucaslinhares Dec 17, 2024
f92ffa5
Update python version to 3.11
lucaslinhares Dec 19, 2024
3989763
Remove python-magic from pip-requires txt
lucaslinhares Dec 19, 2024
588f1a4
Update python version in Dockerfile
lucaslinhares Dec 19, 2024
dd970ea
Merge branch 'update/9.1.198' of https://github.com/Ilhasoft/rapidpro…
lucaslinhares Dec 20, 2024
5e87133
Merge branch 'main' of https://github.com/Ilhasoft/rapidpro into upda…
lucaslinhares Jan 13, 2025
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
Prev Previous commit
Next Next commit
Tweak menu items for msg views and flow results
  • Loading branch information
rowanseymour committed Jul 17, 2024
commit 74c0c62658d6acb9eb1f0b8f371d92f05f0d01ce
4 changes: 2 additions & 2 deletions temba/flows/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ def test_list_views(self):
self.assertEqual(1, response.context["folders"][0]["count"])
self.assertEqual(2, response.context["folders"][1]["count"])

self.assertEqual(("archive", "label", "download-results"), response.context["actions"])
self.assertEqual(("archive", "label", "export-results"), response.context["actions"])

# but does appear in archived list
response = self.client.get(reverse("flows.flow_archived"))
Expand Down Expand Up @@ -2168,7 +2168,7 @@ def test_filter(self):
response = self.client.get(reverse("flows.flow_filter", args=[label1.uuid]))
self.assertEqual([flow2, flow1], list(response.context["object_list"]))
self.assertEqual(2, len(response.context["labels"]))
self.assertEqual(("label", "download-results"), response.context["actions"])
self.assertEqual(("label", "export-results"), response.context["actions"])

response = self.client.get(reverse("flows.flow_filter", args=[label2.uuid]))
self.assertEqual([flow2], list(response.context["object_list"]))
Expand Down
10 changes: 5 additions & 5 deletions temba/flows/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def derive_queryset(self, *args, **kwargs):

class List(BaseList):
title = _("Active")
bulk_actions = ("archive", "label", "download-results")
bulk_actions = ("archive", "label", "export-results")
menu_path = "/flow/active"

def derive_queryset(self, *args, **kwargs):
Expand All @@ -810,7 +810,7 @@ def derive_queryset(self, *args, **kwargs):

class Filter(BaseList, OrgObjPermsMixin):
add_button = True
bulk_actions = ("label", "download-results")
bulk_actions = ("label", "export-results")
slug_url_kwarg = "uuid"

def derive_menu_path(self):
Expand Down Expand Up @@ -1374,10 +1374,10 @@ def build_content_menu(self, menu):

if self.has_org_perm("flows.flow_export_results"):
menu.add_modax(
_("Download"),
"download-results",
_("Export"),
"export-results",
f"{reverse('flows.flow_export_results')}?ids={obj.id}",
title=_("Download Results"),
title=_("Export Results"),
)

if self.has_org_perm("flows.flow_editor"):
Expand Down
12 changes: 6 additions & 6 deletions temba/msgs/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ def test_inbox(self):
msg1.refresh_from_db()
self.assertEqual({label1, label3}, set(msg1.labels.all()))

self.assertContentMenu(inbox_url, self.user, ["Download"])
self.assertContentMenu(inbox_url, self.admin, ["New Broadcast", "New Label", "Download"])
self.assertContentMenu(inbox_url, self.user, ["Export"])
self.assertContentMenu(inbox_url, self.admin, ["Send", "New Label", "Export"])

def test_flows(self):
flow = self.create_flow("Test")
Expand Down Expand Up @@ -804,7 +804,7 @@ def test_filter(self):
self.assertEqual(f"/msg/labels/{label3.uuid}", response.headers[TEMBA_MENU_SELECTION])
self.assertEqual(200, response.status_code)
self.assertEqual(("label",), response.context["actions"])
self.assertContentMenu(label3_url, self.user, ["Download", "Usages"]) # no update or delete
self.assertContentMenu(label3_url, self.user, ["Export", "Usages"]) # no update or delete

# check that non-visible messages are excluded, and messages and ordered newest to oldest
self.assertEqual([msg6, msg3, msg2, msg1], list(response.context["object_list"]))
Expand All @@ -814,7 +814,7 @@ def test_filter(self):
self.assertEqual({msg1, msg6}, set(response.context_data["object_list"]))

# check admin users see edit and delete options for labels
self.assertContentMenu(label1_url, self.admin, ["Edit", "Download", "Usages", "Delete"])
self.assertContentMenu(label1_url, self.admin, ["Edit", "Delete", "-", "Export", "Usages"])

def test_export(self):
export_url = reverse("msgs.msg_export")
Expand Down Expand Up @@ -2517,7 +2517,7 @@ def test_list(self):
self.assertRequestDisallowed(list_url, [None, self.agent])
self.assertListFetch(list_url, [self.user, self.editor, self.admin], context_objects=[])
self.assertContentMenu(list_url, self.user, [])
self.assertContentMenu(list_url, self.admin, ["New Broadcast"])
self.assertContentMenu(list_url, self.admin, ["Send"])

broadcast = self.create_broadcast(
self.admin,
Expand All @@ -2533,7 +2533,7 @@ def test_scheduled(self):
self.assertRequestDisallowed(scheduled_url, [None, self.agent])
self.assertListFetch(scheduled_url, [self.user, self.editor, self.admin], context_objects=[])
self.assertContentMenu(scheduled_url, self.user, [])
self.assertContentMenu(scheduled_url, self.admin, ["New Broadcast"])
self.assertContentMenu(scheduled_url, self.admin, ["Send"])

bc1 = self.create_broadcast(
self.admin,
Expand Down
20 changes: 11 additions & 9 deletions temba/msgs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ def get_context_data(self, **kwargs):
def build_content_menu(self, menu):
if self.has_org_perm("msgs.broadcast_create"):
menu.add_modax(
_("New Broadcast"), "send-message", reverse("msgs.broadcast_create"), title=_("New Broadcast")
_("Send"), "send-message", reverse("msgs.broadcast_create"), title=_("New Broadcast"), as_button=True
)
if self.has_org_perm("msgs.label_create"):
menu.add_modax(_("New Label"), "new-msg-label", reverse("msgs.label_create"), title=_("New Label"))

if self.allow_export and self.has_org_perm("msgs.msg_export"):
menu.add_modax(_("Download"), "export-messages", self.derive_export_url(), title=_("Download Messages"))
menu.add_modax(_("Export"), "export-messages", self.derive_export_url(), title=_("Export Messages"))


class ComposeForm(Form):
Expand Down Expand Up @@ -342,7 +342,7 @@ def get_queryset(self, **kwargs):
def build_content_menu(self, menu):
if self.has_org_perm("msgs.broadcast_create"):
menu.add_modax(
_("New Broadcast"),
_("Send"),
"new-scheduled",
reverse("msgs.broadcast_create"),
title=_("New Broadcast"),
Expand All @@ -363,7 +363,7 @@ class Scheduled(MsgListView):
def build_content_menu(self, menu):
if self.has_org_perm("msgs.broadcast_create"):
menu.add_modax(
_("New Broadcast"),
_("Send"),
"new-scheduled",
reverse("msgs.broadcast_create"),
title=_("New Broadcast"),
Expand Down Expand Up @@ -987,11 +987,6 @@ def build_content_menu(self, menu):
title="Edit Label",
)

if self.has_org_perm("msgs.msg_export"):
menu.add_modax(_("Download"), "export-messages", self.derive_export_url(), title=_("Download Messages"))

menu.add_modax(_("Usages"), "label-usages", reverse("msgs.label_usages", args=[self.label.uuid]))

if self.has_org_perm("msgs.label_delete"):
menu.add_modax(
_("Delete"),
Expand All @@ -1000,6 +995,13 @@ def build_content_menu(self, menu):
title="Delete Label",
)

menu.new_group()

if self.has_org_perm("msgs.msg_export"):
menu.add_modax(_("Export"), "export-messages", self.derive_export_url(), title=_("Export Messages"))

menu.add_modax(_("Usages"), "label-usages", reverse("msgs.label_usages", args=[self.label.uuid]))

@classmethod
def derive_url_pattern(cls, path, action):
return r"^%s/%s/(?P<label_uuid>[^/]+)/$" % (path, action)
Expand Down
4 changes: 2 additions & 2 deletions templates/flows/flow_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block content %}
{% if org_perms.flows.flow_update %}
<temba-modax header="{% trans "Download Results" %}" id="export-results">
<temba-modax header="{% trans "Export Results" %}" id="export-results">
</temba-modax>
<temba-modax header="{% trans "Create Label" %}"
endpoint="{% url 'flows.flowlabel_create' %}"
Expand Down Expand Up @@ -144,7 +144,7 @@
refreshMenu();
}

function handleDownloadFlowResults(evt) {
function handleExportFlowResults(evt) {
var endpoint = '{% url "flows.flow_export_results" %}';
var modal = document.querySelector("#export-results");
var ids = getCheckedIds();
Expand Down
6 changes: 3 additions & 3 deletions templates/includes/short_pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
</temba-tip>
</div>
{% endif %}
{% if 'download-results' in actions %}
<div onclick="handleDownloadFlowResults(event)" class="linked ml-4">
<temba-tip position="top" text="{{ _("Download Results") |escapejs }}">
{% if 'export-results' in actions %}
<div onclick="handleExportFlowResults(event)" class="linked ml-4">
<temba-tip position="top" text="{{ _("Export Results") |escapejs }}">
<temba-icon name="download" clickable="true" class="show-loading">
</temba-icon>
</temba-tip>
Expand Down