Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
6e105a76
Commit
6e105a76
authored
May 20, 2011
by
Eric Davis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ticket/unstable/400-activity-event-types' into unstable
parents
c778cc92
078df723
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
issue.rb
app/models/issue.rb
+8
-1
search_controller_test.rb
test/functional/search_controller_test.rb
+4
-3
acts_as_journalized.rb
...or/plugins/acts_as_journalized/lib/acts_as_journalized.rb
+1
-0
No files found.
app/models/issue.rb
View file @
6e105a76
...
...
@@ -39,7 +39,14 @@ class Issue < ActiveRecord::Base
acts_as_watchable
acts_as_journalized
:event_title
=>
Proc
.
new
{
|
o
|
"
#{
o
.
tracker
.
name
}
#
#{
o
.
journaled_id
}
(
#{
o
.
status
}
):
#{
o
.
subject
}
"
},
:event_type
=>
Proc
.
new
{
|
o
|
'issue'
+
(
o
.
closed?
?
' closed'
:
''
)}
:event_type
=>
Proc
.
new
{
|
o
|
t
=
'issue'
if
o
.
changes
.
empty?
t
<<
'-note'
unless
o
.
initial?
else
t
<<
(
IssueStatus
.
find_by_id
(
o
.
new_value_for
(
:status_id
)).
try
(
:is_closed?
)
?
'-closed'
:
'-edit'
)
end
t
}
register_on_journal_formatter
(
:id
,
'parent_id'
)
register_on_journal_formatter
(
:named_association
,
'project_id'
,
'status_id'
,
'tracker_id'
,
'assigned_to_id'
,
...
...
test/functional/search_controller_test.rb
View file @
6e105a76
...
...
@@ -49,11 +49,12 @@ class SearchControllerTest < ActionController::TestCase
get
:index
,
:q
=>
'issue'
,
:issues
=>
1
assert_response
:success
assert_template
'index'
assert
assigns
(
:results
).
include?
(
Issue
.
find
(
8
))
assert
assigns
(
:results
).
include?
(
Issue
.
find
(
5
))
assert_tag
:dt
,
:attributes
=>
{
:class
=>
/issue closed/
},
:child
=>
{
:tag
=>
'a'
,
:content
=>
/Closed/
}
assert_select
"dt.issue"
do
assert_select
"a"
,
:text
=>
/Closed/
end
end
def
test_search_project_and_subprojects
...
...
vendor/plugins/acts_as_journalized/lib/acts_as_journalized.rb
View file @
6e105a76
...
...
@@ -172,6 +172,7 @@ module Redmine
:anchor
=>
(
"note-
#{
journal
.
anchor
}
"
unless
journal
.
initial?
)
}
end
end
options
[
:type
]
||=
self
.
name
.
underscore
.
dasherize
# Make sure the name of the journalized model and not the name of the journal is used for events
{
:description
=>
:notes
,
:author
=>
:user
}.
reverse_merge
options
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