Skip to content

Commit ac3658d

Browse files
committed
CLDR-18536 site: docs for CLA Org update
1 parent f5304ee commit ac3658d

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

docs/site/index/survey-tool/admin.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "Survey Tool Administrator's Page"
3+
---
4+
5+
## CLA
6+
7+
Note: A SurveyTool restart will be required to flush the CLA settings cache.
8+
9+
### Updating the Organization status of a single user
10+
11+
The following SQL will update a single user (id 12) with a specific organization
12+
13+
```sql
14+
-- get ready to update
15+
-- find the set kind for SignedCla
16+
set @SET_CLA = (select set_id from set_kinds where set_name = 'SignedCla');
17+
set @UPDATE_ORG = 'airbnb'; set @SIGNED_DATE='2023-08-28'; set @CLDR_VER='48';
18+
SET @UPDATE_USER = 12;
19+
SELECT @SET_CLA,@UPDATE_ORG,@SIGNED_DATE,@CLDR_VER,@UPDATEUSER; -- verify vars
20+
-- Update ONE USER
21+
REPLACE INTO set_values (usr_id, set_id, set_value)
22+
values (@UPDATE_USER, @SET_CLA,
23+
CONCAT('{"email":"-","name":"-","employer":"',
24+
@UPDATE_ORG,
25+
'","corporate":"true","version":"',
26+
@CLDR_VER,
27+
'","signed":"',
28+
@SIGNED_DATE,
29+
'","readonly":"true"}')
30+
);
31+
-- update ALL USERS
32+
select id from CLDR_USERS where org = @UPDATE_ORG;
33+
-- now, double check (dumps the entire table)
34+
select usr_id, set_id, set_value, CONVERT(set_value USING utf8) as j from set_values where set_id = @SET_CLA and usr_id = @UPDATE_USER;
35+
```
36+
37+
### Updating the Organization status of an entire organization
38+
39+
If the in-Java org list isn't updated properly, you can use the script `cla-org-sql-update.sql` (in the repo) to add a stored procedure. (Load and execute the .sql first, it's not loaded by default.)
40+
41+
```sql
42+
CALL update_org_cla('airbnb','48','2023-08-28');
43+
```
44+
45+
This will update every user in the organization's CLA status.

docs/site/sitemap.tsv

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ index
7575
index/survey-tool/faq-and-known-bugs
7676
index/survey-tool/managing-users
7777
index/survey-tool/survey-tool-accounts
78+
index/survey-tool/admin
7879
translation/displaynames
7980
translation/displaynames/countryregion-territory-names
8081
translation/displaynames/languagelocale-name-patterns

0 commit comments

Comments
 (0)