MM-53736: Compliance export button state fix (#24488)
In system console > compliance export, if we set the radio button from false to true. It would enable the "Run export now" button as well. This would actually allow the user to create a job without enabling compliance export. As a result, there would be a job entry which would never run because the config setting was never enabled. To fix this, we don't enable/disable the button until the config is actually saved. https://mattermost.atlassian.net/browse/MM-53736 ```release-note NONE ``` --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
00c8969803
Коммит
c887381318
@@ -148,7 +148,7 @@ describe('Compliance Export', () => {
|
|||||||
cy.findByTestId('enableComplianceExportfalse').click();
|
cy.findByTestId('enableComplianceExportfalse').click();
|
||||||
|
|
||||||
// * Verify that exported button is disabled
|
// * Verify that exported button is disabled
|
||||||
cy.findByRole('button', {name: /run compliance export job now/i}).should('be.disabled');
|
cy.findByRole('button', {name: /run compliance export job now/i}).should('be.enabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('MM-T1167 - Compliance Export job can be canceled', () => {
|
it('MM-T1167 - Compliance Export job can be canceled', () => {
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export default class MessageExportSettings extends AdminSettings {
|
|||||||
enableComplianceExport: config.MessageExportSettings.EnableExport,
|
enableComplianceExport: config.MessageExportSettings.EnableExport,
|
||||||
exportFormat: config.MessageExportSettings.ExportFormat,
|
exportFormat: config.MessageExportSettings.ExportFormat,
|
||||||
exportJobStartTime: config.MessageExportSettings.DailyRunTime,
|
exportJobStartTime: config.MessageExportSettings.DailyRunTime,
|
||||||
|
canRunJob: config.MessageExportSettings.EnableExport,
|
||||||
};
|
};
|
||||||
if (config.MessageExportSettings.GlobalRelaySettings) {
|
if (config.MessageExportSettings.GlobalRelaySettings) {
|
||||||
state.globalRelayCustomerType = config.MessageExportSettings.GlobalRelaySettings.CustomerType;
|
state.globalRelayCustomerType = config.MessageExportSettings.GlobalRelaySettings.CustomerType;
|
||||||
@@ -316,7 +317,7 @@ export default class MessageExportSettings extends AdminSettings {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
getExtraInfoText={this.getJobDetails}
|
getExtraInfoText={this.getJobDetails}
|
||||||
disabled={this.props.isDisabled || !this.state.enableComplianceExport}
|
disabled={this.props.isDisabled || !this.state.canRunJob}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</SettingsGroup>
|
||||||
);
|
);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user