|
160 | 160 | var ticketCard=ticketCardModele.clone().removeClass('ticket-modele').addClass('project'+issue.project.id).show(); |
161 | 161 |
|
162 | 162 | jQuery('.id',ticketCard).html(issue.id).attr('href',relativeUrl+'/issues/'+issue.id); |
163 | | - jQuery('.project',ticketCard).html(issue.project.name).attr('href',relativeUrl+'/projects/'+issue.project.name+'/issues'); |
| 163 | + //jQuery('.project',ticketCard).html(issue.project.name).attr('href',relativeUrl+'/projects/'+issue.project.name+'/issues'); |
| 164 | + jQuery('.parent',ticketCard).html(issue.parent).attr('href',relativeUrl+'/issues/'+issue.parent.id); |
164 | 165 | jQuery('.subject',ticketCard).html(issue.subject); |
165 | | - jQuery('.status',ticketCard).html(issue.status.name); |
166 | | - jQuery('.author',ticketCard).html(issue.author.name); |
167 | | - if(issue.category){ |
168 | | - jQuery('.category',ticketCard).html(issue.category.name); |
169 | | - }else{ |
170 | | - jQuery('.category',ticketCard).closest('.line').hide(); |
171 | | - } |
172 | | - |
173 | | - jQuery('.createdOn',ticketCard).html(dateFormat(new Date(issue.created_on),"yyyy-mm-dd")); |
174 | | - |
175 | | - if(issue.due_date){ |
176 | | - jQuery('.commitedDate',ticketCard).html(dateFormat(new Date(issue.due_date),"yyyy-mm-dd")); |
177 | | - }else{ |
178 | | - jQuery('.commitedDate',ticketCard).html(); |
179 | | - } |
180 | | - |
181 | | - if(issue.estimated_hours){ |
182 | | - jQuery('.estimatedHour',ticketCard).html(issue.estimated_hours); |
| 166 | + |
| 167 | + if(issue.story_points){ |
| 168 | + jQuery('.estimation',ticketCard).html(issue.story_points); |
183 | 169 | }else{ |
184 | | - jQuery('.estimatedHour',ticketCard).html(); |
| 170 | + jQuery('.estimation',ticketCard).html(); |
185 | 171 | } |
186 | 172 |
|
187 | | - if (issue.spent_hours) { |
188 | | - jQuery('.spendTime',ticketCard).html(issue.spent_hours); |
189 | | - } else { |
190 | | - jQuery('.spendTime',ticketCard).html(); |
191 | | - } |
192 | | - |
193 | | - if(showLinkedTicket && issue.relations && issue.relations.length>0){ |
194 | | - console.log(JSON.stringify(issue.relations)); |
195 | | - var x_issues=new Array(); |
196 | | - for (var i=0;i<issue.relations.length;i++){ |
197 | | - var il=issue.relations[i]; |
198 | | - if(issue.id==il.issue_id) { x_issues[i]= il.issue_to_id; } |
199 | | - else { x_issues[i]= il.issue_id; } |
200 | | - } |
201 | | - var text= JSON.stringify(x_issues); |
202 | | - jQuery('.linked span',ticketCard).html(text); |
203 | | - jQuery('.linked',ticketCard).show(); |
204 | | - } else { |
205 | | - jQuery('.linked',ticketCard).hide(); |
206 | | - } |
207 | 173 | jQuery('.line.custom-field').hide(); |
208 | 174 | if(issue.custom_fields){ |
209 | 175 | for (var i=0;i<issue.custom_fields.length;i++){ |
210 | | - if(issue.custom_fields[i].id==12){ |
211 | | - //Nom du demandeur |
212 | | - if(issue.custom_fields[i].value=="Moi"){ |
213 | | - jQuery('.demandeur span',ticketCard).html(issue.author.name); |
214 | | - }else{ |
215 | | - jQuery('.demandeur span',ticketCard).html(issue.custom_fields[i].value); |
| 176 | + if(issue.custom_fields[i].name== "Type d'anomalie"){ |
| 177 | + jQuery('.anomalie span',ticketCard).html(issue.custom_fields[i].value); |
| 178 | + jQuery('.anomalie').show(); |
| 179 | + } |
| 180 | + if(issue.custom_fields[i].name=="Conditions de d\u00e9part"){ |
| 181 | + if(issue.custom_fields[i].value){ |
| 182 | + jQuery('.start span',ticketCard).html(issue.custom_fields[i].value)); |
216 | 183 | } |
217 | | - jQuery('.demandeur').show(); |
| 184 | + jQuery('.start').show(); |
218 | 185 | } |
219 | | - if(issue.custom_fields[i].id==13){ |
220 | | - //Date souhaité |
| 186 | + if(issue.custom_fields[i].name=="Conditions d'acceptation"){ |
221 | 187 | if(issue.custom_fields[i].value){ |
222 | | - jQuery('.requestedDate span',ticketCard).html(dateFormat(new Date(issue.custom_fields[i].value),"yyyy-mm-dd")); |
| 188 | + jQuery('.finish span',ticketCard).html(issue.custom_fields[i].value)); |
223 | 189 | } |
224 | | - jQuery('.requestedDate').show(); |
| 190 | + jQuery('.finish').show(); |
225 | 191 | } |
226 | 192 | } |
227 | 193 | } |
|
0 commit comments