@@ -35,8 +35,6 @@ const NewStory = () => {
3535 initialDescriptionInputsValue
3636 )
3737
38- const [ underConsiderationId , setUnderConsiderationId ] = useState ( '' )
39-
4038 const [ description , setDescription ] = useState ( '' )
4139
4240 const [ categories , setCategories ] = useState ( [ ] )
@@ -83,10 +81,7 @@ const NewStory = () => {
8381 products {
8482 id
8583 Name
86- user_story_template {
87- Name
88- Template
89- }
84+ user_story_template
9085 }
9186 }`
9287 } ,
@@ -98,8 +93,7 @@ const NewStory = () => {
9893 setProducts ( products )
9994 const productToTemplateTextMap = { }
10095 products . forEach ( ( product ) => {
101- productToTemplateTextMap [ product . id ] =
102- product . user_story_template ?. Template ?? ''
96+ productToTemplateTextMap [ product . id ] = product . user_story_template ?? ''
10397 } )
10498 setDescriptionInputs ( {
10599 ...initialDescriptionInputsValue ,
@@ -129,21 +123,6 @@ const NewStory = () => {
129123
130124 trackPromise ( fetchPriorities ( ) )
131125
132- const fetchUserStoryStatuses = async ( ) => {
133- const response = await axios . post ( `${ apiURL } /graphql` , {
134- query : `query {
135- userStoryStatuses (where: {
136- Status: "Under consideration"
137- }) {
138- id
139- }
140- }`
141- } )
142- setUnderConsiderationId ( response . data . data . userStoryStatuses [ 0 ] ?. id ?? '' )
143- }
144-
145- trackPromise ( fetchUserStoryStatuses ( ) )
146-
147126 const fetchStoriesData = async ( ) => {
148127 const response = await axios . post (
149128 `${ apiURL } /graphql` ,
@@ -196,7 +175,6 @@ const NewStory = () => {
196175 Description: "${ data . description } "
197176 Title: "${ data . title } "
198177 Category: ${ data . category }
199- user_story_status: "${ underConsiderationId } "
200178 product: "${ data . product } "
201179 Priority: ${ data . priority }
202180 }
0 commit comments