Creating new Epic fails with 422 error when Group already has Epics present
Summary
While creating new Epic, if we try to create one in a Group where there are no Epics present, Epics creation is successful, but if we try to create an Epic in a group where there are already Epics present. Request fails with 422 Unprocessable Entity
error. This is because in such POST request, CSRF token is missing in request headers.
Proposal
This may be related to using VueResource in new_epic_service.js
, but other places work fine in similar condition where VueResource is used, so this is an odd bug. For now, using axios
from '~/lib/utils/axios_utils'
fixes the problem.