BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
milestone.rb
app/models/milestone.rb
+1
-1
38393-Milestone-duration-error-message-is-not-accurate-enough.yml
...lestone-duration-error-message-is-not-accurate-enough.yml
+5
-0
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
...
@@ -256,7 +256,7 @@ class Milestone < ActiveRecord::Base
def
start_date_should_be_less_than_due_date
def
start_date_should_be_less_than_due_date
if
due_date
<=
start_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
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
...
@@ -11,7 +11,7 @@ describe Milestone do
milestone
=
build
(
:milestone
,
start_date:
Date
.
tomorrow
,
due_date:
Date
.
yesterday
)
milestone
=
build
(
:milestone
,
start_date:
Date
.
tomorrow
,
due_date:
Date
.
yesterday
)
expect
(
milestone
).
not_to
be_valid
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
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