ClickUp is a cloud based project management / ToDo environment. (url: https://clickup.com/?noRedirect=true).
This Python package adds some functionality that is currently not present.
It allows you to:
- shift tasks (by a number of days),
- score tasks (by using 4 custom fields),
- based on the score give them a priority.
Reference to those custom fields have been hard coded. Therefore, scoring will not work out of the box, shifting tasks should work.
When you add the following fields the code could work, although the field references have been hard coded.

pip install ClickUpShiftScore
Load the module and add your API code when you create an instance of CU.
from ClickUpShiftScore.core import *
test = CU("pk_42327425_CWKU0F6UMM3Q62KMJ6UDG0BL1RE20AFA")
test.updatetasks("score", 1)
test.updatetasks("priority", 10)
test.updatetasks("shift", 7)
mermaid
flowchart LR
subgraph Init
A1[Initit] -->|API key| B1[[self.API key]]
A1 --> C1[[self.folderdata]]
end
subgraph updatetasks
A[updatetasks]
C1 --> |Folderdata| A
B1 --> |API key| A
A --> C{Choice}
C -->|score| D[updatescore]
C -->|shift| E[shiftstartandduedate]
C -->|priority| F[updatepriority]
end
Init --> updatetasks
mermaid
sequenceDiagram
autonumber
actor User
participant test as test #58; CU
participant updatetasks as updatetasks #58; test
participant urlrequest as urlrequest #58; helper
participant updatescore as updatescore #58; helper
participant shiftstartandduedate as shiftstartandduedate #58; helper
participant updatepriority as updatepriority #58; helper
User->>test:Init (with API key)
Note over User, test: User folders stored during init.
User->>updatetasks: updatetasks("score", 1)
loop folders
rect rgba(0, 100, 255, .1)
Note over updatetasks, urlrequest: Loop over folders to get the lists
updatetasks->>urlrequest: urlrequest(folderid)
urlrequest->>updatetasks: listdata
loop lists
rect rgba(0, 100, 255, .1)
Note over updatetasks, urlrequest: Loop over lists to get the tasks
updatetasks->>urlrequest: urlrequest(listid)
urlrequest->>updatetasks: taskdata
Note over updatetasks, updatepriority: for each task in a list one of following options is run [score, shift, priority]
autonumber 7
rect rgba(0, 100, 255, .1)
alt is score
updatetasks->>updatescore: updatescore(field, task, score)
autonumber 7
else is shift
updatetasks->>shiftstartandduedate: shiftstartandduedate(task, startdate, duedate, dagen, apikey)
autonumber 7
else is priority
updatetasks->>updatepriority: updatepriority(task, score, apikey)
end
end
end
end
end
end