stable

Clone or download

Read-only

Update GET .../actions with more readable date value format

Part of story #12187 configure workflow pre & post actions at target state level How to test: - Go to /plugins/tracker/?tracker={trackerId}&func=admin-workflow-transitions - Create a new empty transitino post action (without any value) - Get this action through GET /tracker_workflow_transitions/:id/actions with Api Explorer --> "date" attribute is null - Update this post action and set "clear" as field value - Get this action through REST api --> "date" attribute is "" - Update the post action to set current date as field value - Get this action through REST api --> "date" attribute is now "current" - Update the post action value in database with an unknown value (ex: 99) (tracker_workflow_transition_postactions_field_date.field_type) - Get this action through REST api --> 500 with corresponding bad value Change-Id: I935cfa308bbd24f4c8fa99fc90927370b46c6980

Modified Files

Name
M plugins/tracker/include/REST/v1/Workflow/PostAction/PostActionsRepresentationBuilder.php +6 −0 Go to diff View file
M plugins/tracker/include/REST/v1/Workflow/PostAction/SetFieldValueRepresentation.php +24 −6 Go to diff View file
A plugins/tracker/include/REST/v1/Workflow/PostAction/UnsupportedDateValueException.php +47 −0 Go to diff View file
M plugins/tracker/phpunit/REST/v1/Workflow/PostAction/PostActionsRepresentationBuilderTest.php +1 −1 Go to diff View file
A plugins/tracker/phpunit/REST/v1/Workflow/PostAction/SetFieldValueRepresentationTest.php +65 −0 Go to diff View file
A plugins/tracker/phpunit/REST/v1/Workflow/PostAction/UnsupportedDateValueExceptionTestTest.php +41 −0 Go to diff View file