Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
80a4bf2e
Commit
80a4bf2e
authored
Dec 04, 2019
by
Gladys Forte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update reject template approver
parent
349a62e1
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
363 additions
and
4033 deletions
+363
-4033
app/businesslayer/changerequest/change_request.py
app/businesslayer/changerequest/change_request.py
+3
-7
app/helper/email_service/sender.py
app/helper/email_service/sender.py
+8
-11
app/helper/email_service/templates/RMS-CRREJECTED-APPROVER.html
...lper/email_service/templates/RMS-CRREJECTED-APPROVER.html
+35
-0
app/helper/email_service/templates/RMS-CRREVISED.html
app/helper/email_service/templates/RMS-CRREVISED.html
+1
-1
requirements/RMSv2 copy.postman_collection.json
requirements/RMSv2 copy.postman_collection.json
+0
-3630
requirements/RMSv2.postman_collection.json
requirements/RMSv2.postman_collection.json
+316
-384
No files found.
app/businesslayer/changerequest/change_request.py
View file @
80a4bf2e
...
...
@@ -566,7 +566,7 @@ def cr_routing_actions(approver_instance, current_user, move_to_level):
elif
approver_instance
[
'action'
]
.
lower
()
==
'rejected'
:
#
send email to vendor
#
reject from requestor action
if
delegation
.
lower
()
==
'requestor'
:
notification_msg
=
VENDOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
...
...
@@ -591,16 +591,12 @@ def cr_routing_actions(approver_instance, current_user, move_to_level):
else
:
# move_to_level
back_to_approver
=
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
Q
(
form_code
=
form_code
)
&
Q
(
level
=
move_to_level
)
&
(
~
Q
(
action
=
None
)
|
Q
(
delegation__name
=
'Requestor'
))
)
.
first
()
print
(
back_to_approver
.
delegation
.
name
)
if
back_to_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
requestor_notification_msg
=
REQUESTOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
...
...
@@ -646,9 +642,9 @@ def cr_routing_actions(approver_instance, current_user, move_to_level):
)
else
:
approver_code
=
back_to_approver
.
user
.
code
approver_notification_msg
=
REVISED_MESSAGE
.
split
(
';'
)[
0
]
send_mail_approver
(
...
...
app/helper/email_service/sender.py
View file @
80a4bf2e
...
...
@@ -222,7 +222,8 @@ def admin_changepassword(args):
# RMS-CRAPPROVED ; RMS-CRACKNOWLEDGE ; RMS-CRCOMPLETED ; RMS-CRACCEPTED ;
# RMS-CRREJECTED ; RMS-CRREJECTED-VENDOR ; RMS-CRREVISED ; RMS-CRCANCELLED-USERTRIGGER
# RMS-CRREJECTED ; RMS-CRREJECTED-VENDOR ; RMS-CRREVISED ; RMS-CRCANCELLED-USERTRIGGER ;
# RMS-CRREJECTED-APPROVER
def
routing_table_actions
(
args
):
...
...
@@ -262,13 +263,16 @@ def routing_table_actions(args):
if
args
[
14
]
.
lower
()
==
'requestor'
:
subject
=
'Resource Management System - Change Request Rejected'
email_template
=
'RMS-CRREJECTED.html'
elif
args
[
14
]
.
lower
()
==
'vendor'
or
args
[
14
]
.
lower
()
==
'approver'
:
elif
args
[
14
]
.
lower
()
==
'vendor'
:
subject
=
'Resource Management System - Action Required for Change Request'
email_template
=
'RMS-CRREVISED.html'
elif
args
[
14
]
.
lower
()
==
'approver'
:
subject
=
'Resource Management System - Action Required for Change Request'
email_template
=
'RMS-CRREJECTED-APPROVER.html'
elif
args
[
12
]
.
lower
()
==
'cancelled'
:
subject
=
'Resource Management System - Change Request Cancelled'
email_template
=
'RMS-CRCANCELLED-USERTRIGGER.html'
F
=
open
(
os
.
path
.
join
(
settings
.
EMAIL_TEMPLATES_ROOT
,
email_template
),
'r'
)
FC
=
F
.
read
()
...
...
@@ -283,17 +287,10 @@ def routing_table_actions(args):
FC
=
FC
.
replace
(
'{department_requestedto}'
,
department_requestedto
)
FC
=
FC
.
replace
(
'{priority_level}'
,
priority_level
)
FC
=
FC
.
replace
(
'{url}'
,
url
)
if
args
[
12
]
.
lower
()
==
'rejected'
:
FC
=
FC
.
replace
(
'{remarks}'
,
remarks
)
if
email_template
==
'RMS-CRREVISED.html'
:
if
args
[
14
]
.
lower
()
==
'vendor'
:
FC
=
FC
.
replace
(
'{action_revise}'
,
'acknowledgement'
)
else
:
FC
=
FC
.
replace
(
'{action_revise}'
,
'approval'
)
try
:
send_mail
(
subject
=
subject
,
...
...
app/helper/email_service/templates/RMS-CRREJECTED-APPROVER.html
0 → 100644
View file @
80a4bf2e
<!DOCTYPE html>
<html>
<head>
<title>
RMS: Change Request Rejected
</title>
</head>
<body
style=
"font-family: arial;"
>
<h3>
Resource Management System
(
RMS
)
</h3>
<h3
style=
"color:#888888;"
>
Change Request Rejected
</h3><br>
<p>
Dear {name},
</p><br>
<p>
A change request you have previously approved, has been re-submitted for your approval. Please see the details of the change request below.
</p><br>
<b>
Rejected By
</b><br>
{action_by}
<br><br>
<b>
Routing Level
</b><br>
{routing_level}
<br><br>
<b>
Status
</b><br>
{status}
<br><br><br>
<b>
CR Number
</b><br>
{cr_number}
<br><br>
<b>
CR Name
</b><br>
{cr_name}
<br><br>
<b>
Company Requested To
</b><br>
{company_requestedto}
<br><br>
<b>
Department Requested To
</b><br>
{department_requestedto}
<br><br>
<b>
Priority Level
</b><br>
{priority_level}
<br><br>
<b>
Remarks
</b><br>
{remarks}
<br><br>
<p>
Please click
<u><a
href=
"{url}"
style=
"text-decoration:underline;color:#007bff;"
target=
"_blank"
>
here
</a></u>
to access your change request.
</p><br>
<p>
Sincerely,
</p>
<p>
RMS Team
</p><br><br>
<p>
Powered by
</p>
<img
src=
"https://s3-ap-southeast-1.amazonaws.com/oneberry/img/logo_oneberry.png"
class=
"img-responsive"
style=
"width:150px;height:auto;"
/>
</body>
</html>
\ No newline at end of file
app/helper/email_service/templates/RMS-CRREVISED.html
View file @
80a4bf2e
...
...
@@ -9,7 +9,7 @@
<h3
style=
"color:#888888;"
>
Change Request Revision
</h3><br>
<p>
Dear {name},
</p><br>
<p>
A change request has been submitted for your
{action_revise}
to revise. Please see the details of the change request below.
</p><br>
<p>
A change request has been submitted for your
acknowledgement
to revise. Please see the details of the change request below.
</p><br>
<b>
Rejected By
</b><br>
{action_by}
<br><br>
<b>
Routing Level
</b><br>
{routing_level}
<br><br>
...
...
requirements/RMSv2 copy.postman_collection.json
deleted
100644 → 0
View file @
349a62e1
This diff is collapsed.
Click to expand it.
requirements/RMSv2.postman_collection.json
View file @
80a4bf2e
This diff is collapsed.
Click to expand it.
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