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
a8bedefe
Commit
a8bedefe
authored
Sep 21, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 352625: "You are receiving this mail because" messages cannot be localized
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=myk, a=myk
parent
c6433b10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
32 deletions
+41
-32
BugMail.pm
Bugzilla/BugMail.pm
+11
-30
Filesystem.pm
Bugzilla/Install/Filesystem.pm
+1
-0
newchangedmail.txt.tmpl
template/en/default/email/newchangedmail.txt.tmpl
+29
-2
No files found.
Bugzilla/BugMail.pm
View file @
a8bedefe
...
...
@@ -555,29 +555,6 @@ sub sendMail {
return
0
;
}
# XXX: This needs making localisable, probably by passing the role to
# the email template and letting it choose the text.
my
$reasonsbody
=
"------- You are receiving this mail because: -------\n"
;
while
(
my
(
$relationship
,
$bits
)
=
each
%
{
$relRef
})
{
if
(
$relationship
==
REL_ASSIGNEE
)
{
$reasonsbody
.=
"You are the assignee for the bug.\n"
if
(
$bits
&
BIT_DIRECT
);
$reasonsbody
.=
"You are watching the assignee for the bug.\n"
if
(
$bits
&
BIT_WATCHING
);
}
elsif
(
$relationship
==
REL_REPORTER
)
{
$reasonsbody
.=
"You reported the bug.\n"
if
(
$bits
&
BIT_DIRECT
);
$reasonsbody
.=
"You are watching the reporter.\n"
if
(
$bits
&
BIT_WATCHING
);
}
elsif
(
$relationship
==
REL_QA
)
{
$reasonsbody
.=
"You are the QA contact for the bug.\n"
if
(
$bits
&
BIT_DIRECT
);
$reasonsbody
.=
"You are watching the QA contact for the bug.\n"
if
(
$bits
&
BIT_WATCHING
);
}
elsif
(
$relationship
==
REL_CC
)
{
$reasonsbody
.=
"You are on the CC list for the bug.\n"
if
(
$bits
&
BIT_DIRECT
);
$reasonsbody
.=
"You are watching someone on the CC list for the bug.\n"
if
(
$bits
&
BIT_WATCHING
);
}
elsif
(
$relationship
==
REL_VOTER
)
{
$reasonsbody
.=
"You are a voter for the bug.\n"
if
(
$bits
&
BIT_DIRECT
);
$reasonsbody
.=
"You are watching a voter for the bug.\n"
if
(
$bits
&
BIT_WATCHING
);
}
}
my
$isnew
=
!
$start
;
# If an attachment was created, then add an URL. (Note: the 'g'lobal
...
...
@@ -598,13 +575,16 @@ sub sendMail {
$diffs
=
$difftext
.
"\n\n"
.
$newcomments
;
}
my
(
@
headerrel
,
@watchingrel
);
while
(
my
(
$rel
,
$bits
)
=
each
%
{
$relRef
})
{
push
@headerrel
,
(
REL_NAMES
->
{
$rel
}
)
if
(
$bits
&
BIT_DIRECT
);
push
@watchingrel
,
(
REL_NAMES
->
{
$rel
}
)
if
(
$bits
&
BIT_WATCHING
);
my
(
@
reasons
,
@reasons_watch
);
while
(
my
(
$rel
ationship
,
$bits
)
=
each
%
{
$relRef
})
{
push
(
@reasons
,
$relationship
)
if
(
$bits
&
BIT_DIRECT
);
push
(
@reasons_watch
,
$relationship
)
if
(
$bits
&
BIT_WATCHING
);
}
push
@headerrel
,
'None'
if
!
scalar
(
@headerrel
);
push
@watchingrel
,
'None'
if
!
scalar
(
@watchingrel
);
my
@headerrel
=
map
{
REL_NAMES
->
{
$_
}
}
@reasons
;
my
@watchingrel
=
map
{
REL_NAMES
->
{
$_
}
}
@reasons_watch
;
push
(
@headerrel
,
'None'
)
unless
@headerrel
;
push
(
@watchingrel
,
'None'
)
unless
@watchingrel
;
push
@watchingrel
,
map
{
user_id_to_login
(
$_
)
}
@$watchingRef
;
my
$sitespec
=
'@'
.
Bugzilla
->
params
->
{
'urlbase'
};
...
...
@@ -635,9 +615,10 @@ sub sendMail {
targetmilestone
=>
$values
{
'target_milestone'
},
changedfields
=>
$values
{
'changed_fields'
},
summary
=>
$values
{
'short_desc'
},
reasons
=>
\
@reasons
,
reasons_watch
=>
\
@reasons_watch
,
reasonsheader
=>
join
(
" "
,
@headerrel
),
reasonswatchheader
=>
join
(
" "
,
@watchingrel
),
reasonsbody
=>
$reasonsbody
,
changer
=>
$values
{
'changer'
},
changername
=>
$values
{
'changername'
},
diffs
=>
$diffs
,
...
...
Bugzilla/Install/Filesystem.pm
View file @
a8bedefe
...
...
@@ -114,6 +114,7 @@ sub FILESYSTEM {
'docs/README.docs'
=>
{
perms
=>
$owner_readable
},
"$datadir/bugzilla-update.xml"
=>
{
perms
=>
$ws_writeable
},
"$datadir/params"
=>
{
perms
=>
$ws_writeable
},
"$datadir/mailer.testfile"
=>
{
perms
=>
$ws_writeable
},
);
# Directories that we want to set the perms on, but not
...
...
template/en/default/email/newchangedmail.txt.tmpl
View file @
a8bedefe
...
...
@@ -43,5 +43,32 @@ X-Bugzilla-Changed-Fields: [% changedfields %]
--
Configure bugmail: [% Param('urlbase') %]userprefs.cgi?tab=email
[%+ reasonsbody %]
------- You are receiving this mail because: -------
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You watching the reporter.
[% CASE constants.REL_QA %]
You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are watching a voter for the [% terms.bug %].
[% 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