Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 signup: the person chooses the password and name on the confirm page 83c7aa6 2 weeks, 5 days ago History
tasks.json · 6.0 KB · 260 lines
1{
2 "name": "tasks",
3 "title": "Tasks",
4 "version": 11,
5 "description": "Work items with an enforced status lifecycle. Transition guards add who-per-verb on top of row-filtered update rights. v6 adds task_type/template_id/instructions/metadata (the 'Work / CreateWork' fields reconciled against a private predecessor-system audit, not part of this repo); status/urgency and every transition guard are unchanged.",
6 "fields": [
7 {
8 "name": "id"
9 },
10 {
11 "name": "title",
12 "type": "text",
13 "required": true,
14 "label": "Title",
15 "validation": {
16 "min_length": 1,
17 "max_length": 200
18 }
19 },
20 {
21 "name": "description",
22 "type": "textarea",
23 "label": "Description"
24 },
25 {
26 "name": "instructions",
27 "type": "textarea",
28 "label": "Instructions",
29 "help": "How-to guidance for whoever works this task, distinct from description -- the audited predecessor's create_task keeps the two separate."
30 },
31 {
32 "name": "task_type",
33 "type": "enum",
34 "label": "Task Type",
35 "default": "STANDARD",
36 "enum": [
37 "BASIC",
38 "STANDARD",
39 "CONTRACT"
40 ]
41 },
42 {
43 "name": "template_id",
44 "label": "Template",
45 "relation": {
46 "collection": "templates",
47 "display_field": "name"
48 },
49 "help": "Optional link to the app-templates record this task was created from or is filling out -- the Work/CreateWork link. Seeding a new task's fields from the template's schema/default_values on create is not built here (see app-tasks/objects/site/tasks.py); this field just carries the reference."
50 },
51 {
52 "name": "metadata",
53 "type": "textarea",
54 "label": "Metadata (JSON)",
55 "help": "Optional free-form structured data. Stored as a JSON string, same convention as app-templates' schema/default_values fields (this codebase's field-type contract, docs/schema-forms.md, has no dedicated json type)."
56 },
57 {
58 "name": "project_id",
59 "label": "Project",
60 "relation": {
61 "collection": "projects",
62 "display_field": "name"
63 }
64 },
65 {
66 "name": "status",
67 "type": "enum",
68 "label": "Status",
69 "default": "open",
70 "enum": [
71 "draft",
72 "open",
73 "assigned",
74 "waiting_on_client",
75 "approved",
76 "disputed",
77 "cancelled"
78 ],
79 "transitions": {
80 "draft": [
81 {
82 "to": "open",
83 "when": {
84 "owner_id": "$user_id"
85 }
86 },
87 {
88 "to": "assigned",
89 "when": {
90 "owner_id": "$user_id"
91 }
92 },
93 {
94 "to": "cancelled",
95 "when": {
96 "owner_id": "$user_id"
97 }
98 }
99 ],
100 "open": [
101 "assigned",
102 {
103 "to": "cancelled",
104 "when": {
105 "owner_id": "$user_id"
106 }
107 }
108 ],
109 "assigned": [
110 {
111 "to": "waiting_on_client",
112 "when": {
113 "assigned_to": "$user_id"
114 }
115 },
116 {
117 "to": "open",
118 "when": {
119 "assigned_to": "$user_id"
120 }
121 },
122 {
123 "to": "cancelled",
124 "when": {
125 "owner_id": "$user_id"
126 }
127 }
128 ],
129 "waiting_on_client": [
130 {
131 "to": "approved",
132 "when": {
133 "owner_id": "$user_id"
134 }
135 },
136 {
137 "to": "disputed",
138 "when": {
139 "owner_id": "$user_id"
140 }
141 },
142 "assigned"
143 ],
144 "disputed": [
145 {
146 "to": "assigned",
147 "when": {
148 "owner_id": "$user_id"
149 }
150 },
151 {
152 "to": "cancelled",
153 "when": {
154 "owner_id": "$user_id"
155 }
156 }
157 ]
158 },
159 "help": "approved and cancelled are terminal. draft moves and cancelling require the task owner; returning or submitting an assigned task requires the current assignee; resolving waiting_on_client or a dispute requires the owner. Anyone with update rights may accept an open task."
160 },
161 {
162 "name": "urgency",
163 "type": "enum",
164 "label": "Urgency",
165 "default": "normal",
166 "enum": [
167 "low",
168 "normal",
169 "high",
170 "critical"
171 ]
172 },
173 {
174 "name": "due_date",
175 "type": "date",
176 "label": "Due Date"
177 },
178 {
179 "name": "assigned_to",
180 "type": "text",
181 "label": "Assigned To",
182 "help": "User id of the worker"
183 },
184 {
185 "name": "created_at",
186 "type": "datetime",
187 "label": "Created",
188 "read_only": true
189 },
190 {
191 "name": "owner_id",
192 "type": "text",
193 "label": "Owner"
194 }
195 ],
196 "forms": {
197 "default": {
198 "fields": [
199 "title",
200 "description",
201 "instructions",
202 "project_id",
203 "task_type",
204 "template_id",
205 "status",
206 "urgency",
207 "due_date",
208 "assigned_to"
209 ]
210 }
211 },
212 "views": {
213 "list_mode": "board",
214 "list_fields": [
215 "title",
216 "status",
217 "urgency",
218 "task_type",
219 "due_date",
220 "assigned_to"
221 ],
222 "detail_fields": [
223 "title",
224 "description",
225 "instructions",
226 "project_id",
227 "task_type",
228 "status",
229 "urgency",
230 "due_date",
231 "assigned_to"
232 ],
233 "related": [
234 {
235 "collection": "task_comments",
236 "fk_field": "task_id"
237 },
238 {
239 "collection": "files",
240 "fk_field": "task_id"
241 }
242 ],
243 "filter_fields": [
244 "status",
245 "urgency"
246 ]
247 },
248 "search": {
249 "fields": [
250 "title",
251 "description",
252 "instructions"
253 ]
254 },
255 "capabilities": {
256 "comments": true,
257 "attachments": true,
258 "shareable": true
259 }
260}