Email procedure (beta), WorkFlow update
This commit is contained in:
@@ -165,7 +165,7 @@ class JiraService(OrderService):
|
||||
|
||||
# Always pull summary/status/created/creator, plus every configured
|
||||
# deliverable field and contact field.
|
||||
fields = "summary,status,created,creator,description"
|
||||
fields = "summary,status,created,creator,assignee,description"
|
||||
if self.all_sku_field_ids:
|
||||
fields += "," + ",".join(self.all_sku_field_ids)
|
||||
contact_field_ids = [v for v in self.contact_field_ids.values() if v]
|
||||
@@ -323,6 +323,11 @@ class JiraService(OrderService):
|
||||
creator = fields.get("creator") or {}
|
||||
return creator.get("displayName") or creator.get("emailAddress") or ""
|
||||
|
||||
@staticmethod
|
||||
def _extract_assignee(fields: dict) -> str:
|
||||
assignee = fields.get("assignee") or {}
|
||||
return assignee.get("displayName") or assignee.get("emailAddress") or ""
|
||||
|
||||
def _to_normalized_order(self, issue: dict) -> NormalizedOrder:
|
||||
fields = issue.get("fields", {})
|
||||
created_raw = fields.get("created")
|
||||
@@ -339,6 +344,7 @@ class JiraService(OrderService):
|
||||
company = resolve_company_for_skus(skus, self.sku_map)
|
||||
shipping_info = self._extract_shipping_info(fields)
|
||||
creator = self._extract_creator(fields)
|
||||
assignee = self._extract_assignee(fields)
|
||||
description = adf_to_text(fields.get("description"))
|
||||
|
||||
# These order tickets typically leave the JIRA Summary field
|
||||
@@ -355,8 +361,10 @@ class JiraService(OrderService):
|
||||
line_items=line_items,
|
||||
shipping_info=shipping_info,
|
||||
creator=creator,
|
||||
assignee=assignee,
|
||||
description=description,
|
||||
tracking_numbers=[],
|
||||
shipping_method=None, # comes from ShipStation, not JIRA - see shipstation_service.py
|
||||
summary=summary,
|
||||
status=(fields.get("status") or {}).get("name", ""),
|
||||
source_created_at=created_at,
|
||||
|
||||
Reference in New Issue
Block a user