projectal.entities.project
View Source
from projectal.entity import Entity from projectal.linkers import * from projectal import api class Project(Entity, CustomerLinker, FileLinker, LocationLinker, RebateLinker, StageLinker, StageListLinker): """ Implementation of the [Project](https://projectal.com/docs/latest/#tag/Project) API. """ _path = 'project' _name = 'PROJECT' @classmethod def stage_order(cls, uuId, stages): """Reorder the Project's Stage links in a customer order.""" url = '/api/project/stage_list/order?holder={}'.format(uuId) api.post(url, stages) return True @classmethod def autoschedule(cls, project, mode='ASAP'): """ Autoschedule the project. `project`: A Project entity `mode`: `ASAP` or `ALAP` """ url = '/api/project/schedule?mode={}'.format(mode) api.post(url, [project]) return True def tasks(self): """Get a list of uuIds of all tasks in this Project.""" payload = { "name": "Task in project", "type": "msql", "start": 0, "limit": -1, "holder": "{}".format(self['uuId']), "select": [ [ "PROJECT.TASK.uuId" ] ], } return [t[0] for t in api.query(payload)]
#  
class
Project(projectal.entity.Entity, projectal.linkers.CustomerLinker, projectal.linkers.FileLinker, projectal.linkers.LocationLinker, projectal.linkers.RebateLinker, projectal.linkers.StageLinker, projectal.linkers.StageListLinker):
View Source
class Project(Entity, CustomerLinker, FileLinker, LocationLinker, RebateLinker, StageLinker, StageListLinker): """ Implementation of the [Project](https://projectal.com/docs/latest/#tag/Project) API. """ _path = 'project' _name = 'PROJECT' @classmethod def stage_order(cls, uuId, stages): """Reorder the Project's Stage links in a customer order.""" url = '/api/project/stage_list/order?holder={}'.format(uuId) api.post(url, stages) return True @classmethod def autoschedule(cls, project, mode='ASAP'): """ Autoschedule the project. `project`: A Project entity `mode`: `ASAP` or `ALAP` """ url = '/api/project/schedule?mode={}'.format(mode) api.post(url, [project]) return True def tasks(self): """Get a list of uuIds of all tasks in this Project.""" payload = { "name": "Task in project", "type": "msql", "start": 0, "limit": -1, "holder": "{}".format(self['uuId']), "select": [ [ "PROJECT.TASK.uuId" ] ], } return [t[0] for t in api.query(payload)]
Implementation of the Project API.
View Source
@classmethod def stage_order(cls, uuId, stages): """Reorder the Project's Stage links in a customer order.""" url = '/api/project/stage_list/order?holder={}'.format(uuId) api.post(url, stages) return True
Reorder the Project's Stage links in a customer order.
View Source
@classmethod def autoschedule(cls, project, mode='ASAP'): """ Autoschedule the project. `project`: A Project entity `mode`: `ASAP` or `ALAP` """ url = '/api/project/schedule?mode={}'.format(mode) api.post(url, [project]) return True
Autoschedule the project.
project
: A Project entity
mode
: ASAP
or ALAP
View Source
def tasks(self): """Get a list of uuIds of all tasks in this Project.""" payload = { "name": "Task in project", "type": "msql", "start": 0, "limit": -1, "holder": "{}".format(self['uuId']), "select": [ [ "PROJECT.TASK.uuId" ] ], } return [t[0] for t in api.query(payload)]
Get a list of uuIds of all tasks in this Project.
Inherited Members
- projectal.entity.Entity
- Entity
- get
- update
- delete
- create
- save
- clone
- history
- list
- match
- match_startswith
- match_endswith
- search
- query
- profile_get
- profile_set
- changes
- set_readonly
- builtins.dict
- setdefault
- pop
- popitem
- keys
- items
- values
- fromkeys
- clear
- copy