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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
715221d6
Commit
715221d6
authored
Sep 26, 2018
by
Dennis Tang
Committed by
Nick Thomas
Sep 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preserve order of project tags list
parent
03e09206
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
app/models/project.rb
app/models/project.rb
+1
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+1
-1
changelogs/unreleased/51839-remove-sorting-on-project-tags.yml
...elogs/unreleased/51839-remove-sorting-on-project-tags.yml
+5
-0
spec/features/projects/settings/user_tags_project_spec.rb
spec/features/projects/settings/user_tags_project_spec.rb
+6
-8
No files found.
app/models/project.rb
View file @
715221d6
...
...
@@ -111,7 +111,7 @@ class Project < ActiveRecord::Base
after_create
:ensure_storage_path_exists
after_save
:ensure_storage_path_exists
,
if: :namespace_id_changed?
acts_as_taggable
acts_as_
ordered_
taggable
attr_accessor
:old_path_with_namespace
attr_accessor
:template_name
...
...
app/views/projects/edit.html.haml
View file @
715221d6
...
...
@@ -40,7 +40,7 @@
.form-group
=
f
.
label
:tag_list
,
"Tags"
,
class:
'label-bold'
=
f
.
text_field
:tag_list
,
value:
@project
.
tag_list
.
sort
.
join
(
', '
),
maxlength:
2000
,
class:
"form-control"
=
f
.
text_field
:tag_list
,
value:
@project
.
tag_list
.
join
(
', '
),
maxlength:
2000
,
class:
"form-control"
%p
.form-text.text-muted
Separate tags with commas.
%fieldset
.features
%h5
.prepend-top-0
=
_
(
"Project avatar"
)
...
...
changelogs/unreleased/51839-remove-sorting-on-project-tags.yml
0 → 100644
View file @
715221d6
---
title
:
Preserve order of project tags list
merge_request
:
21897
author
:
type
:
changed
spec/features/projects/settings/user_tags_project_spec.rb
View file @
715221d6
...
...
@@ -9,15 +9,13 @@ describe 'Projects > Settings > User tags a project' do
visit
edit_project_path
(
project
)
end
context
'when a project is archived'
do
it
'unarchives a project'
do
fill_in
'Tags'
,
with:
'tag1, tag2'
it
'sets project tags'
do
fill_in
'Tags'
,
with:
'tag1, tag2'
page
.
within
'.general-settings'
do
click_button
'Save changes'
end
expect
(
find_field
(
'Tags'
).
value
).
to
eq
'tag1, tag2'
page
.
within
'.general-settings'
do
click_button
'Save changes'
end
expect
(
find_field
(
'Tags'
).
value
).
to
eq
'tag1, tag2'
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