[MGNLWORKFLOW-259] Add validators to workflow dialog fields Created: 10/Jul/14 Updated: 17/Nov/16 Resolved: 17/Jul/14 |
|
| Status: | Closed |
| Project: | Magnolia Workflow Module |
| Component/s: | None |
| Affects Version/s: | 5.3, 5.4 |
| Fix Version/s: | 5.3.3, 5.4.1 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Markus Koller | Assignee: | Espen Jervidalo |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Release notes required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
The fields configured in /modules/workflow/dialogs/publish/form/tabs/comment/fields don't accept validators, so no standard validation (i.e. required=true for comment) is possible at the moment. From a support ticket:
|
| Comments |
| Comment by Daniel Lipp [ 16/Jul/14 ] |
|
Looks like the change isn't backwards compatible: the constructor of WorkflowPublicationAction got some additional arguments - custom code might no longer compile hence. We should keep the old constructor and deprecate it. |
| Comment by Espen Jervidalo [ 17/Jul/14 ] |
|
API changed in info.magnolia.module.workflow.action.WorkflowPublicationAction We are now injecting the validator and callback objects into the constructor. Those are being passed directly when instantiating the action, which is why we cannot obtain these by using e.g. Components.getComponent in a deprecated constructor. In case you have extended this class, you will need to update the constructor of your implementation to match super. |
| Comment by Espen Jervidalo [ 17/Jul/14 ] |
|
re-resolving this issue after setting "release notes required" as discussed. |
| Comment by Milan Divilek [ 17/Jul/14 ] |
|
Reopen: Validation doesn't work in reject dialog. Reject dialog comment field (/modules/workflow/dialogs/reject/form/tabs/comment/fields/comment) extends comment field of publish dialog, but if I add required=true to comment field of publish dialog then validation in reject dialog doesn't work. I see an error flashing up in dialog, but the workflow is rejected anyway. |
| Comment by Espen Jervidalo [ 17/Jul/14 ] |
|
Creating a follow up. The reject action is not related to the publication dialog, except for the comment field configuration. |
| Comment by Thomas Duffey [ 17/Nov/16 ] |
|
Not sure if this is related but I am currently trying to add a validator to a field on a workflow publication form that needs to know the node being published. Tried to inject a JcrNodeAdapter into the factory per suggestion from Andrew W. but Magnolia is unable to resolve a value for this. How can we get at the node being activated within a workflow field validator? |