Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
961fb4f7
Commit
961fb4f7
authored
Sep 09, 2014
by
Dylan William Hardison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1053513 - remove last-visited entries when a user removes involvement from a bug
r/a=glob
parent
e181022c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
Bug.pm
Bugzilla/Bug.pm
+7
-0
BugUserLastVisit.pm
Bugzilla/BugUserLastVisit.pm
+9
-0
No files found.
Bugzilla/Bug.pm
View file @
961fb4f7
...
@@ -1134,6 +1134,13 @@ sub update {
...
@@ -1134,6 +1134,13 @@ sub update {
$self
->
update_user_last_visit
(
$user
,
$delta_ts
);
$self
->
update_user_last_visit
(
$user
,
$delta_ts
);
}
}
# If a user is no longer involved, remove their last visit entry
my
$last_visits
=
Bugzilla::
BugUserLastVisit
->
match
({
bug_id
=>
$self
->
id
});
foreach
my
$lv
(
@$last_visits
)
{
$lv
->
remove_from_db
()
unless
$lv
->
user
->
is_involved_with_bug
(
$self
);
}
# Update bug ignore data if user wants to ignore mail for this bug
# Update bug ignore data if user wants to ignore mail for this bug
if
(
exists
$self
->
{
'bug_ignored'
})
{
if
(
exists
$self
->
{
'bug_ignored'
})
{
my
$bug_ignored_changed
;
my
$bug_ignored_changed
;
...
...
Bugzilla/BugUserLastVisit.pm
View file @
961fb4f7
...
@@ -39,6 +39,13 @@ sub bug_id { return $_[0]->{bug_id} }
...
@@ -39,6 +39,13 @@ sub bug_id { return $_[0]->{bug_id} }
sub
user_id
{
return
$_
[
0
]
->
{
user_id
}
}
sub
user_id
{
return
$_
[
0
]
->
{
user_id
}
}
sub
last_visit_ts
{
return
$_
[
0
]
->
{
last_visit_ts
}
}
sub
last_visit_ts
{
return
$_
[
0
]
->
{
last_visit_ts
}
}
sub
user
{
my
$self
=
shift
;
$self
->
{
user
}
//
=
Bugzilla::
User
->
new
({
id
=>
$self
->
user_id
,
cache
=>
1
});
return
$self
->
{
user
};
}
1
;
1
;
__END__
__END__
...
@@ -81,4 +88,6 @@ listed below.
...
@@ -81,4 +88,6 @@ listed below.
=item C<last_visit_ts>
=item C<last_visit_ts>
=item C<user>
=back
=back
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