| 91 | == Create a domain |
| 92 | There is not yet a domain editor available so you have to create domains by manually editing a file with JSON code. |
| 93 | |
| 94 | A domain looks like this |
| 95 | {{{ |
| 96 | {"name":"jobs", |
| 97 | "issuesValues":{ |
| 98 | "lease car":{"values":["yes","no"]}, |
| 99 | "permanent contract":{"values":["yes","no"]}, |
| 100 | "career development opportunities":{"values":["low","medium","high"]}, |
| 101 | "fte":{"values":["0.6","0.8","1.0"]}, |
| 102 | "salary":{"values":["2000","2500","3000","3500","4000"]}, |
| 103 | "work from home":{"values":["0","1","2"]} |
| 104 | } |
| 105 | } |
| 106 | }}} |
| 107 | |
| 108 | * The name is just a string. It must match the filename and directory name when placed on the profiles server. So your directory must be domainsrepo/jobs and the filename must be jobs.json. |
| 109 | * The issueValues contains a dictionary with issues. Each issue is indicated by a name (a string), followed by a column (:) and then a dictionary. The dictionary can contain either a discrete valueset or a number valueset |
| 110 | * a discrete valueset looks like "values", a column and then a list of discrete values (all strings) |
| 111 | * a number valueset contains a range of numbers and looks like {{{ {"range":["12.2","12.6","0.3"]} }}} so "range:" followed by a list of 3 values. The first value is the minimum value in the range, the second the maximum value in the range, and the third the step value. This example range thus contains 12.2 and 12.5 (the next one would be 12.8 but that is already outside the range). |
| 112 | |