Skip to content

Commit 30a91f4

Browse files
adbharadwajAditya Bharadwaj
and
Aditya Bharadwaj
authoredApr 21, 2021
Rename team messages to scratchpad (#767)
* Rename team messages to scratchpad * Renaming more team messages * Rename migration file Co-authored-by: Aditya Bharadwaj <[email protected]>
1 parent 4cc11ad commit 30a91f4

File tree

17 files changed

+52
-34
lines changed

17 files changed

+52
-34
lines changed
 

‎docs/source/api.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ All requests must be signed using `HTTP signatures <http://tools.ietf.org/html/d
5454
"id": 123,
5555
"short_description": "Project Description",
5656
"priority": 10,
57-
"team_messages_url": "http://review.document.url",
57+
"scratchpad_url": "http://review.document.url",
5858
"task_class": 1,
5959
"project_data": {
6060
"sample_data_item": "sample_data_value_new"

‎docs/source/getting_started_transcript.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Information received! Here's what we got::
4343
'project': {'id': 5,
4444
'priority': 10,
4545
'project_data': {'url': 'http://www.josephbotros.com/'},
46-
'team_messages_url': 'https://docs.google.com/document/d/1s0IJycNAwHtZfsUwyo6lCJ7kI9pTOZddcaiRDdZUSAs',
46+
'scratchpad_url': 'https://docs.google.com/document/d/1s0IJycNAwHtZfsUwyo6lCJ7kI9pTOZddcaiRDdZUSAs',
4747
'short_description': 'A test run of our simple workflow',
4848
'start_datetime': '2015-09-25T17:51:14.784739Z',
4949
'task_class': 0,
@@ -94,7 +94,7 @@ Information received! Here's what we got::
9494
'project': {'id': 5,
9595
'priority': 10,
9696
'project_data': {'url': 'http://www.josephbotros.com/'},
97-
'team_messages_url': 'https://docs.google.com/document/d/1s0IJycNAwHtZfsUwyo6lCJ7kI9pTOZddcaiRDdZUSAs',
97+
'scratchpad_url': 'https://docs.google.com/document/d/1s0IJycNAwHtZfsUwyo6lCJ7kI9pTOZddcaiRDdZUSAs',
9898
'short_description': 'A test run of our simple workflow',
9999
'start_datetime': '2015-09-25T17:51:14.784739Z',
100100
'task_class': 0,

‎orchestra/google_apps/convenience.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
logger = logging.getLogger(__name__)
2323
_image_mimetype_regex = re.compile('(image/(?:jpg|jpeg|gif|png|svg))',
2424
re.IGNORECASE)
25-
TEAM_MESSAGES_TEMPLATE_ID = '1d0kIgq8G_Su6j5abP-tP6yJ2sp-sFDk6vZiREil0_70'
25+
SCRATCHPAD_TEMPLATE_ID = '1d0kIgq8G_Su6j5abP-tP6yJ2sp-sFDk6vZiREil0_70'
2626
GSPREAD_RE = re.compile('https://docs.google.com/spreadsheets/d/([^/]*)/.*')
2727
GSPREAD_EXPORT_URL = ('https://docs.google.com/spreadsheets/d/'
2828
'{}/export?format=csv')
@@ -140,9 +140,9 @@ def create_project_google_folder(project):
140140
[write_with_link_permission])
141141
folder_id = folder.get('id')
142142
project.project_data['project_folder_id'] = folder_id
143-
project.team_messages_url = create_document_from_template(
144-
TEAM_MESSAGES_TEMPLATE_ID,
145-
'Team Messages',
143+
project.scratchpad_url = create_document_from_template(
144+
SCRATCHPAD_TEMPLATE_ID,
145+
'Scratchpad',
146146
[folder_id],
147147
[write_with_link_permission])['alternateLink']
148148
project.save()

‎orchestra/interface_api/project_management/tests/test_project_management_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_project_information_api(self):
6666
expected_project = {
6767
'task_class': project.task_class,
6868
'start_datetime': '2015-10-12T00:00:00Z',
69-
'team_messages_url': None,
69+
'scratchpad_url': None,
7070
'admin_url': settings.ORCHESTRA_URL + reverse(
7171
'admin:orchestra_project_change',
7272
args=(project.id,)),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 2.2.13 on 2021-04-19 17:47
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('orchestra', '0093_todo_status_default'),
10+
]
11+
12+
operations = [
13+
migrations.RenameField(
14+
model_name='project',
15+
old_name='team_messages_url',
16+
new_name='scratchpad_url',
17+
),
18+
]

‎orchestra/models/core/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class Project(ProjectMixin, models.Model):
387387
task_class (int):
388388
Represents whether the project is a worker training exercise
389389
or a deliverable project.
390-
team_messages_url (str):
390+
scratchpad_url (str):
391391
A scratchpad in which teammates can collaborate, created only if
392392
Google Apps support is turned on.
393393
slack_group_id (str):
@@ -419,7 +419,7 @@ class Status:
419419
project_data = JSONField(default={}, blank=True)
420420
task_class = models.IntegerField(
421421
choices=WorkerCertification.TASK_CLASS_CHOICES)
422-
team_messages_url = models.URLField(null=True, blank=True)
422+
scratchpad_url = models.URLField(null=True, blank=True)
423423
slack_group_id = models.CharField(max_length=200, null=True, blank=True)
424424

425425
class Meta:

‎orchestra/project_api/serializers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Meta:
2222
'start_datetime',
2323
'priority',
2424
'project_data',
25-
'team_messages_url',
25+
'scratchpad_url',
2626
'task_class',
2727
'status'
2828
)

‎orchestra/project_api/tests/test_project_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_project_information(self):
8787
'workflow_slug': 'w1',
8888
'workflow_version_slug': 'test_workflow',
8989
'project_data': {},
90-
'team_messages_url': None,
90+
'scratchpad_url': None,
9191
'priority': 0,
9292
'status': 0
9393
},

‎orchestra/static/dist/main.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -32540,9 +32540,9 @@ var _quillDirectiveEs = __webpack_require__(165);
3254032540

3254132541
var _quillDirectiveEs2 = _interopRequireDefault(_quillDirectiveEs);
3254232542

32543-
var _teamMessagesDirectiveEs = __webpack_require__(172);
32543+
var _scratchpadDirectiveEs = __webpack_require__(172);
3254432544

32545-
var _teamMessagesDirectiveEs2 = _interopRequireDefault(_teamMessagesDirectiveEs);
32545+
var _scratchpadDirectiveEs2 = _interopRequireDefault(_scratchpadDirectiveEs);
3254632546

3254732547
var _projectFolderDirectiveEs = __webpack_require__(174);
3254832548

@@ -32557,7 +32557,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
3255732557
/* global angular */
3255832558

3255932559
var name = 'orchestra.common';
32560-
angular.module('orchestra.common', []).factory('orchestraService', _orchestraServicesEs.orchestraService).factory('orchestraTasks', _orchestraServicesEs.orchestraTasks).factory('orchestraApi', _orchestra_apiEs2.default).factory('helpers', _helpersEs2.default).filter('capitalize', _orchestraFiltersEs.capitalize).filter('toArray', _orchestraFiltersEs.toArray).directive('orchestraChecklist', _checklistDirectiveEs2.default).directive('orchestraChecklistItem', _checklistItemDirectiveEs2.default).directive('orchestraQuill', _quillDirectiveEs2.default).directive('orchestraTeamMessages', _teamMessagesDirectiveEs2.default).directive('projectFolder', _projectFolderDirectiveEs2.default).directive('websiteIframe', _websiteIframeDirectiveEs2.default);
32560+
angular.module('orchestra.common', []).factory('orchestraService', _orchestraServicesEs.orchestraService).factory('orchestraTasks', _orchestraServicesEs.orchestraTasks).factory('orchestraApi', _orchestra_apiEs2.default).factory('helpers', _helpersEs2.default).filter('capitalize', _orchestraFiltersEs.capitalize).filter('toArray', _orchestraFiltersEs.toArray).directive('orchestraChecklist', _checklistDirectiveEs2.default).directive('orchestraChecklistItem', _checklistItemDirectiveEs2.default).directive('orchestraQuill', _quillDirectiveEs2.default).directive('orchestraScratchpad', _scratchpadDirectiveEs2.default).directive('projectFolder', _projectFolderDirectiveEs2.default).directive('websiteIframe', _websiteIframeDirectiveEs2.default);
3256132561

3256232562
exports.default = name;
3256332563

@@ -60482,17 +60482,17 @@ module.exports = SnowTheme;
6048260482
Object.defineProperty(exports, "__esModule", {
6048360483
value: true
6048460484
});
60485-
exports.default = orchestraTeamMessages;
60485+
exports.default = orchestraScratchpad;
6048660486

60487-
var _teamMessages = __webpack_require__(173);
60487+
var _scratchpad = __webpack_require__(173);
6048860488

60489-
var _teamMessages2 = _interopRequireDefault(_teamMessages);
60489+
var _scratchpad2 = _interopRequireDefault(_scratchpad);
6049060490

6049160491
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6049260492

60493-
function orchestraTeamMessages() {
60493+
function orchestraScratchpad() {
6049460494
return {
60495-
template: _teamMessages2.default,
60495+
template: _scratchpad2.default,
6049660496
restrict: 'E',
6049760497
controllerAs: 'vm',
6049860498
controller: function controller($scope, orchestraService) {
@@ -60506,7 +60506,7 @@ function orchestraTeamMessages() {
6050660506
/* 173 */
6050760507
/***/ (function(module, exports) {
6050860508

60509-
module.exports = "<website-iframe title=\"Team Messages\"\n\t\tid=\"team-messages\" \n\t\tng-if=\"vm.taskAssignment.project.team_messages_url\"\n\t\tiframe-url=\"{{vm.taskAssignment.project.team_messages_url}}\">\n</website-iframe>\n";
60509+
module.exports = "<website-iframe title=\"Scratchpad\"\n\t\tid=\"scratchpad\" \n\t\tng-if=\"vm.taskAssignment.project.scratchpad_url\"\n\t\tiframe-url=\"{{vm.taskAssignment.project.scratchpad_url}}\">\n</website-iframe>\n";
6051060510

6051160511
/***/ }),
6051260512
/* 174 */

‎orchestra/static/orchestra/common/common.module.es6.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import orchestraChecklist from 'orchestra/common/components/checklist/checklist.directive.es6.js'
1515
import orchestraChecklistItem from 'orchestra/common/components/checklist/checklist-item.directive.es6.js'
1616
import orchestraQuill from 'orchestra/common/components/quill/quill.directive.es6.js'
17-
import orchestraTeamMessages from 'orchestra/common/components/team-messages/team-messages.directive.es6.js'
17+
import orchestraScratchpad from 'orchestra/common/components/scratchpad/scratchpad.directive.es6.js'
1818
import projectFolder from 'orchestra/common/components/project-folder/project-folder.directive.es6.js'
1919
import websiteIframe from 'orchestra/common/components/website-iframe/website-iframe.directive.es6.js'
2020

@@ -30,7 +30,7 @@ angular.module('orchestra.common', [])
3030
.directive('orchestraChecklist', orchestraChecklist)
3131
.directive('orchestraChecklistItem', orchestraChecklistItem)
3232
.directive('orchestraQuill', orchestraQuill)
33-
.directive('orchestraTeamMessages', orchestraTeamMessages)
33+
.directive('orchestraScratchpad', orchestraScratchpad)
3434
.directive('projectFolder', projectFolder)
3535
.directive('websiteIframe', websiteIframe)
3636

‎orchestra/static/orchestra/common/components/team-messages/team-messages.directive.es6.js ‎orchestra/static/orchestra/common/components/scratchpad/scratchpad.directive.es6.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import template from './team-messages.html'
1+
import template from './scratchpad.html'
22

3-
export default function orchestraTeamMessages () {
3+
export default function orchestraScratchpad () {
44
return {
55
template,
66
restrict: 'E',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<website-iframe title="Scratchpad"
2+
id="scratchpad"
3+
ng-if="vm.taskAssignment.project.scratchpad_url"
4+
iframe-url="{{vm.taskAssignment.project.scratchpad_url}}">
5+
</website-iframe>

‎orchestra/static/orchestra/common/components/team-messages/team-messages.html

-5
This file was deleted.

‎orchestra/tests/test_dashboard.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def _verify_good_task_assignment_information(
534534
'project_data': {},
535535
'status': dict(
536536
Project.STATUS_CHOICES)[task.project.status],
537-
'team_messages_url': None},
537+
'scratchpad_url': None},
538538
'status': assignment_status,
539539
'task': {'data': task_data, 'status': task_status},
540540
'task_id': task.id,

‎orchestra/tests/test_project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_create_project_google_folder(self):
3535
project_folder = create_project_google_folder(project)
3636
self.assertEqual(project_folder['id'], 1)
3737
self.assertEqual(
38-
project.team_messages_url, 'http://a.google.com/link')
38+
project.scratchpad_url, 'http://a.google.com/link')
3939

4040
@override_settings(ORCHESTRA_SLACK_EXPERTS_ENABLED=True)
4141
def test_create_project_slack_group(self):

‎orchestra/utils/task_lifecycle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def get_task_details(task_id):
373373
'project': {
374374
'id': project.id,
375375
'details': project.short_description,
376-
'team_messages_url': project.team_messages_url,
376+
'scratchpad_url': project.scratchpad_url,
377377
'project_data': project.project_data,
378378
'status': dict(Project.STATUS_CHOICES)[project.status]
379379
},

‎orchestra/utils/tests/test_task_lifecycle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def test_get_task_overview_for_worker(self):
334334
'id': task.project.id,
335335
'project_data': {},
336336
'status': 'Active',
337-
'team_messages_url': None},
337+
'scratchpad_url': None},
338338
'workflow': {'slug': 'w1',
339339
'name': 'Workflow One'},
340340
'workflow_version': {'slug': 'test_workflow',

0 commit comments

Comments
 (0)
Please sign in to comment.