Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.6.0-b2
-
Component/s: Staff Interface
-
Labels:None
Description
When running a cron task manually via URL with cron key, a company ID should also be passed via GET to run the task for a specific company. Otherwise, the company the task will run for will be derived from the current hostname, or be the first company from the list of all companies.
This task should allow a GET parameter to specify the company ID to run via cron.
I am noticing that with multiple companies enabled, running the cron manually as staff for a single cron task will still run the cron for the company determined by the current hostname rather than the current company the staff is logged in to.
AppController::getCompany appears to be where the company is determined.
Staff session info was:
>blesta_company_id|s:1:"2";blesta_id|s:1:"1";ip|s:12:"123.456.78.9";blesta_staff_id|s:1:"1";
"blesta_company_id" was "2", but the cron was run for company "1" instead.
FYI, the staff was logged in at company "1"'s hostname, but had used the selector in the header to switch to the other company before running the cron.
Activity
Field | Original Value | New Value |
---|---|---|
Sprint | 3.6.0 Beta 2 [ 18 ] |
Description |
I am noticing that with multiple companies enabled, running the cron manually as staff from [Settings] -> [System] -> [Automation] will still run the cron for the company determined by the current hostname rather than the current company the staff is set to.
AppController::getCompany appears to be where the company is determined. Staff session info was: >blesta_company_id|s:1:"2";blesta_id|s:1:"1";ip|s:12:"123.456.78.9";blesta_staff_id|s:1:"1"; "blesta_company_id" was "2", but the cron was run for company "1" instead. FYI, the staff was logged in at company "1"'s hostname, but had used the selector in the header to switch to the other company before running the cron. |
I am noticing that with multiple companies enabled, running the cron manually as staff for a single cron task will still run the cron for the company determined by the current hostname rather than the current company the staff is logged in to.
AppController::getCompany appears to be where the company is determined. Staff session info was: >blesta_company_id|s:1:"2";blesta_id|s:1:"1";ip|s:12:"123.456.78.9";blesta_staff_id|s:1:"1"; "blesta_company_id" was "2", but the cron was run for company "1" instead. FYI, the staff was logged in at company "1"'s hostname, but had used the selector in the header to switch to the other company before running the cron. |
Issue Type | Bug [ 1 ] | Improvement [ 4 ] |
Description |
I am noticing that with multiple companies enabled, running the cron manually as staff for a single cron task will still run the cron for the company determined by the current hostname rather than the current company the staff is logged in to.
AppController::getCompany appears to be where the company is determined. Staff session info was: >blesta_company_id|s:1:"2";blesta_id|s:1:"1";ip|s:12:"123.456.78.9";blesta_staff_id|s:1:"1"; "blesta_company_id" was "2", but the cron was run for company "1" instead. FYI, the staff was logged in at company "1"'s hostname, but had used the selector in the header to switch to the other company before running the cron. |
When running a cron task manually via URL with cron key, a company ID should also be passed via GET to run the task for a specific company. Otherwise, the company the task will run for will be derived from the current hostname, or be the first company from the list of all companies.
This task should allow a GET parameter to specify the company ID to run via cron. ---- I am noticing that with multiple companies enabled, running the cron manually as staff for a single cron task will still run the cron for the company determined by the current hostname rather than the current company the staff is logged in to. AppController::getCompany appears to be where the company is determined. Staff session info was: >blesta_company_id|s:1:"2";blesta_id|s:1:"1";ip|s:12:"123.456.78.9";blesta_staff_id|s:1:"1"; "blesta_company_id" was "2", but the cron was run for company "1" instead. FYI, the staff was logged in at company "1"'s hostname, but had used the selector in the header to switch to the other company before running the cron. |
Fix Version/s | 3.6.0-b2 [ 10802 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 3.6.0-b2 [ 10802 ] | |
Resolution | Fixed [ 1 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |