Skip to content

Commit 142d90b

Browse files
committed
Included validation to avoid create issues without an sprint assignation
1 parent b42e171 commit 142d90b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

app/Http/Requests/IssueRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function rules()
3232
{
3333
return [
3434
'title' => 'required|min:2|max:255',
35+
'sprint_id' => 'required|integer',
3536
];
3637
}
3738
/**
@@ -45,6 +46,7 @@ public function messages()
4546
'title.required' => trans('gitscrum.issue-cannot-be-blank'),
4647
'title.min' => trans('gitscrum.issue-must-be-at-least-2-characters'),
4748
'title.max' => trans('gitscrum.issue-must-be-between-2-and-255-characters'),
49+
'sprint_id.required' => trans('gitscrum.sprint-cannot-be-blank'),
4850
];
4951
}
5052

resources/lang/en/gitscrum.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* The MIT License (MIT)
77
* Copyright (c) 2017 Renato Marinho <renato.marinho@s2move.com>
88
*/
9-
return array (
9+
return array (
1010
'sprints' => 'Sprints',
1111
'issue-type' => 'Issue Type',
1212
'search-issue-type-by-name...' => 'Search issue type by name...',
@@ -187,4 +187,5 @@
187187
'congratulations-the-product-backlog-has-been-updated-with-successfully' => 'Congratulations! The Product Backlog has been successfully updated',
188188
'favorited-successfully' => 'Favorited',
189189
'unfavorited-successfully' => 'Unfavorited',
190+
'sprint-cannot-be-blank' => 'Sprint can not be blank',
190191
);

resources/lang/es/gitscrum.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* The MIT License (MIT)
77
* Copyright (c) 2017 Renato Marinho <renato.marinho@s2move.com>
88
*/
9-
return array (
9+
return array (
1010
'sprints' => 'Sprints',
1111
'issue-type' => 'Tipo de issue',
1212
'search-issue-type-by-name...' => 'Buscar un issue por su nombre...',
@@ -17,7 +17,7 @@
1717
'labels' => 'Etiquetas',
1818
'label' => 'Etiqueta',
1919
'profile' => 'Perfil',
20-
'cooperation' => 'Coopración',
20+
'cooperation' => 'Cooperación',
2121
'issues-done' => 'Issues completados',
2222
'commits' => 'Commits',
2323
'dashboard' => 'Panel de control',
@@ -188,4 +188,5 @@
188188
'congratulations-the-product-backlog-has-been-updated-with-successfully' => '¡Felicidades! El product backlog ha sido actualizado correctamente',
189189
'favorited-successfully' => 'Añadido a favoritos correctamente',
190190
'unfavorited-successfully' => 'Eliminado de favoritos correctamente',
191+
'sprint-cannot-be-blank' => 'El sprint no puede quedar vacío',
191192
);

0 commit comments

Comments
 (0)