diff --git a/modules/interfaces/interfaceTicketObjects.py b/modules/interfaces/interfaceTicketObjects.py index d7bed987..d55daad3 100644 --- a/modules/interfaces/interfaceTicketObjects.py +++ b/modules/interfaces/interfaceTicketObjects.py @@ -525,10 +525,9 @@ class TicketSharepointSyncInterface: [["Header 1"] + [""] * (len(df.columns) - 1)], columns=df.columns ) - # Row 2: Static header row 2 with timestamp - timestamp = get_utc_now().strftime("%Y-%m-%d %H:%M:%S") + # Row 2: Static header row 2 with strict compatibility header_row2 = pd.DataFrame( - [[f"{timestamp}"] + [""] * (len(df.columns) - 1)], columns=df.columns + [["Header 2"] + [""] * (len(df.columns) - 1)], columns=df.columns ) # Row 3: Table headers (column names) diff --git a/modules/routes/routeJira.py b/modules/routes/routeJira.py index 847010ec..31bcbe73 100644 --- a/modules/routes/routeJira.py +++ b/modules/routes/routeJira.py @@ -15,8 +15,18 @@ router = APIRouter( @router.post("/sync/delta-group") -async def sync_jira(): - logger.info("Syncing Jira issues...") +async def sync_jira_delta_group(): + """Endpoint to trigger JIRA-SharePoint sync for Delta Group project.""" + + logger.info("Received request to sync JIRA Delta Group project") + await perform_sync_jira_delta_group() + + # Return a response + return {"status": "Sync completed"} + + +async def perform_sync_jira_delta_group(): + logger.info("Syncing Jira issues for Delta Group...") # Sharepoint connection parameters sharepoint_client_id = None @@ -95,6 +105,3 @@ async def sync_jira(): # Sync from CSV in Sharepoint to JIRA await sync_interface.sync_from_csv_to_jira() - - # Return a response - return {"status": "Sync completed"}