Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b3a5abe4
Commit
b3a5abe4
authored
Nov 18, 2017
by
Xurxo Méndez Pérez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed validation error message on wrong milestone dates
parent
6675bab5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/models/milestone.rb
app/models/milestone.rb
+1
-1
changelogs/unreleased/38393-Milestone-duration-error-message-is-not-accurate-enough.yml
...lestone-duration-error-message-is-not-accurate-enough.yml
+5
-0
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+1
-1
No files found.
app/models/milestone.rb
View file @
b3a5abe4
...
...
@@ -256,7 +256,7 @@ class Milestone < ActiveRecord::Base
def
start_date_should_be_less_than_due_date
if
due_date
<=
start_date
errors
.
add
(
:
start_date
,
"Can't be greater than due
date"
)
errors
.
add
(
:
due_date
,
"must be greater than start
date"
)
end
end
...
...
changelogs/unreleased/38393-Milestone-duration-error-message-is-not-accurate-enough.yml
0 → 100644
View file @
b3a5abe4
---
title
:
Changed validation error message on wrong milestone dates
merge_request
:
author
:
Xurxo Méndez Pérez
type
:
fixed
spec/models/milestone_spec.rb
View file @
b3a5abe4
...
...
@@ -11,7 +11,7 @@ describe Milestone do
milestone
=
build
(
:milestone
,
start_date:
Date
.
tomorrow
,
due_date:
Date
.
yesterday
)
expect
(
milestone
).
not_to
be_valid
expect
(
milestone
.
errors
[
:
start_date
]).
to
include
(
"Can't be greater than due
date"
)
expect
(
milestone
.
errors
[
:
due_date
]).
to
include
(
"must be greater than start
date"
)
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment