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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
f3bbb2e7
Commit
f3bbb2e7
authored
Oct 29, 2013
by
Dave Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 927497 - "Add me to CC list" feature of bug creation screen gives token error
r=LpSolit,a=glob
parent
1622591f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
Bug.pm
Bugzilla/WebService/Bug.pm
+18
-10
No files found.
Bugzilla/WebService/Bug.pm
View file @
f3bbb2e7
...
...
@@ -341,8 +341,7 @@ sub get {
my
$ids
=
$params
->
{
ids
};
defined
$ids
||
ThrowCodeError
(
'param_required'
,
{
param
=>
'ids'
});
my
@bugs
;
my
@faults
;
my
(
@bugs
,
@faults
,
@hashes
);
# Cache permissions for bugs. This highly reduces the number of calls to the DB.
# visible_bugs() is only able to handle bug IDs, so we have to skip aliases.
...
...
@@ -366,7 +365,8 @@ sub get {
else
{
$bug
=
Bugzilla::
Bug
->
check
(
$bug_id
);
}
push
(
@bugs
,
$self
->
_bug_to_hash
(
$bug
,
$params
));
push
(
@bugs
,
$bug
);
push
(
@hashes
,
$self
->
_bug_to_hash
(
$bug
,
$params
));
}
# Set the ETag before inserting the update tokens
...
...
@@ -374,14 +374,9 @@ sub get {
# the data has not changed.
$self
->
bz_etag
(
\
@bugs
);
if
(
Bugzilla
->
user
->
id
)
{
foreach
my
$bug
(
@bugs
)
{
my
$token
=
issue_hash_token
([
$bug
->
{
'id'
},
$bug
->
{
'last_change_time'
}]);
$bug
->
{
'update_token'
}
=
$self
->
type
(
'string'
,
$token
);
}
}
$self
->
_add_update_tokens
(
$params
,
\
@bugs
,
\
@hashes
);
return
{
bugs
=>
\
@
bug
s
,
faults
=>
\
@faults
};
return
{
bugs
=>
\
@
hashe
s
,
faults
=>
\
@faults
};
}
# this is a function that gets bug activity for list of bug ids
...
...
@@ -566,6 +561,7 @@ sub possible_duplicates {
{
summary
=>
$params
->
{
summary
},
products
=>
\
@products
,
limit
=>
$params
->
{
limit
}
});
my
@hashes
=
map
{
$self
->
_bug_to_hash
(
$_
,
$params
)
}
@$possible_dupes
;
$self
->
_add_update_tokens
(
$params
,
$possible_dupes
,
\
@hashes
);
return
{
bugs
=>
\
@hashes
};
}
...
...
@@ -1219,6 +1215,18 @@ sub _flag_to_hash {
return
$item
;
}
sub
_add_update_tokens
{
my
(
$self
,
$params
,
$bugs
,
$hashes
)
=
@_
;
return
if
!
Bugzilla
->
user
->
id
;
return
if
!
filter_wants
(
$params
,
'update_token'
);
for
(
my
$i
=
0
;
$i
<
@$bugs
;
$i
++
)
{
my
$token
=
issue_hash_token
([
$bugs
->
[
$i
]
->
id
,
$bugs
->
[
$i
]
->
delta_ts
]);
$hashes
->
[
$i
]
->
{
'update_token'
}
=
$self
->
type
(
'string'
,
$token
);
}
}
1
;
__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