|
|
|
@ -44,7 +44,6 @@ class New extends Component{
|
|
|
|
|
|
|
|
|
|
getSelectList=()=>{
|
|
|
|
|
const { projectsId } = this.props.match.params;
|
|
|
|
|
|
|
|
|
|
const url = `/projects/${projectsId}/issues/new.json`;
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
@ -76,10 +75,12 @@ class New extends Component{
|
|
|
|
|
if(!err){
|
|
|
|
|
const { projectsId } = this.props.match.params;
|
|
|
|
|
const { fileList } = this.state;
|
|
|
|
|
const { current_user } = this.props;
|
|
|
|
|
const url = `/projects/${projectsId}/issues.json`;
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
...values,
|
|
|
|
|
attachment_ids:fileList
|
|
|
|
|
attachment_ids:fileList,
|
|
|
|
|
author_id:current_user.user_id
|
|
|
|
|
}).then(result=>{
|
|
|
|
|
if(result){
|
|
|
|
|
|
|
|
|
|