Sie sind auf Seite 1von 17

Solution Delivery

Technical Specification – {feature}

Solution Delivery

NSSR2-10 Technical Specification

Wrapper Production

Company Confidential

News Limited
2 Holt Street
Surry Hills, NSW 2010

This work package is only


required for an in-house
custom build unless there
are ‘gaps’ in the package
solution requiring a build.

Document Version 0.1

© News Limited 2006 Page 1 of 17


Solution Delivery
Technical Specification – {feature}

© News Limited. All rights reserved


This publication is protected by copyright, and remains the property of News Limited.
No part of this publication may be reproduced, transmitted, translated into any
human or computer language, distributed or stored electronically or mechanically, for
any purpose, on any media, in any form or by any means whatsoever without the
explicit written permission of News Limited.
The publication and information in this publication must be distributed to authorised
persons only and held in confidence by them. The information contained herein shall
be used only for the express purpose described within.
News Limited assumes no responsibility or liability for damages arising from the
inability to use this publication or any omissions from the errors in this publication.
Information in this publication and the products and procedures described herein are
subject to changes without notice.

© News Limited 2006 Page 2 of 17


Solution Delivery
Technical Specification – {feature}

Control Page
Title: Functional Specification – NSSR2-xx {feature}
Validity: When printed, this document is only valid on the day it was
printed. Refer to the softcopy for the latest version.

Author:
Document Purpose:

Change History:

Version Revision Date Revision By Reason for Change


0.1 17th Aug 2006 Gareth Goodman Initial document
0.2 21st Aug 2006 Gareth Goodman First draft complete

Distribution:

Name Role Department

© News Limited 2006 Page 3 of 17


Solution Delivery
Technical Specification – {feature}

ACCEPTANCE
The undersigned hereby approves the attached document

Insert Name
Insert Title
Insert Business Unit
Date

Insert Name
Insert Title
Insert Business Unit
Date

© News Limited 2006 Page 4 of 17


Solution Delivery
Functional Specification – Customer Merge

Table of Contents
Prerequisites.....................................................................................................................6
Related Jira Items.............................................................................................................6
Business Module Impact .................................................................................................6
Implementation Summary...............................................................................................7
Summary of Task WP001 – Unit tests.........................................................................7
Summary of Task WP002 – New Letters field ‘FileName’.........................................8
Summary of Task WP003 – new CustSupplies field ‘WrapperRequired’...................8
Summary of Task WP004 – Create new attributes .....................................................8
Summary of Task WP005 – Create new contact type..................................................9
Summary of Task WP006 – Create stored procedure..................................................9
Summary of Task WP007 – Create list class.............................................................10
Summary of Task WP008 – Create wrapper templates.............................................10
Summary of Task WP009 – Create C# batch job.......................................................11
Unit test Summary.........................................................................................................12
External Interfaces.........................................................................................................12
Appendix 1 – Sample BO_SupplyHistory output......................................................13
Appendix 2 – Stored procedure skeleton...................................................................14
Appendix 3 – Wrapper templates...............................................................................15
Wrapper Example – Single Copy...............................................................................15
Wrapper Example – Multiple Copies.........................................................................16
Wrapper Example – Master Wrap..............................................................................16
Wrapper Header Page................................................................................................17

© News Limited 2006 Page 5 of 17


Solution Delivery
Functional Specification – Customer Merge

Prerequisites

Item Status Description

Related Jira Items

Jira Relationship

Business Module Impact

Module Impact

© News Limited 2006 Page 6 of 17


Solution Delivery
Functional Specification – Customer Merge

Implementation Summary

Task Name Priority Estimat Summary


e
WP001 Unit tests 1 2 days Create unit tests for testable areas
WP002 New Letters field 2 2.5 hours Add new field “FileName” to Letters table,
regenerate stored procedures and base class,
GUI change
WP003 New CustSupplies 3 2.5 hours Create a new field “WrapperRequired” on
field CustSupplies, regenerate stored procedures
and base class, GUI change
WP004 Create new attributes 4 2 hours New attributes for “Agent Number” (with
Drop Number items) and “Master Wrap”.
WP005 Create new contact 5 1 hour Create a new contact to allow Wrappers to be
type linked to Offers
WP006 Create Stored 6 1.5 days Create a stored procedure that returns the set
Procedure of data that will be used to produce wrappers
WP007 Create list class 7 4 hours Create a custom lightweight list class to
handle object selection and aggregation in
the grouping and order presented by the
procedure (step 6)
WP008 Create Wrapper 8 1 day Create mail-merge templates for the wrapper,
templates master wrap and wrapper header
WP009 Create batch job 9 3 days The batch job will use the stored procedure
results (step 6) to create lists and other
objects in order to produce the wrappers,
master wraps and headers.
Total 9 days

Summary of Task WP001 – Unit tests

Create unit tests for the following tasks: -

WP002 – New letters field


WP003 – New CustSupplies field
WP004 – Subscriptions requiring wrapper
WP005 – New contact type
WP007 – New list class (check this works with the results of WP006)

© News Limited 2006 Page 7 of 17


Solution Delivery
Functional Specification – Customer Merge

Summary of Task WP002 – New Letters field ‘FileName’

1. Create new varchar field (255 characters, nullable) called “FileName” in the
Letters table,
2. Regenerate the Letters stored procedures,
3. Regenerate the LetterBase class (NSS.Objects.BaseClasses.Interactions),
4. Add a new textbox to GUIBase.frmLetterEdit, bound to the new property on the
derived Letter class (and datasource for this form)

Summary of Task WP003 – new CustSupplies field ‘WrapperRequired’

1. Create new bit field (nullable) called “WrapperRequired’” in the CustSupplies


table,
2. Regenerate the CustSupplies stored procedures,
3. Regenerate the CustSupplyBase class (NSS.Objects.BaseClasses.Supplies),
4. Add a new textbox to NSSSubs.frmNSSSubscriptionEdit, bound to the new
property on the derived CustSupply class.

Summary of Task WP004 – Create new attributes

1. Create a new xDataItemScopes row with a Code of “Supply”. Regenerate the


DataItemScopes enum
2. A DataItem of scope “Supply” is to be created for each Agent who will be using
Wrappers. These are to be created by a divisional admin post-release. For
development and testing, create at least one DataItem: -

ItemName - (AgentId of intended Agent)


Description - “This is Agent ID {id} using Wrapper”
DataItemScope - (ScopeId from new Supply xDataItemScopes row)
DataItemType - (DataItemTypeId of “System.String” from xDataItemTypes)

3. For this DataItem, create at least one row in DataItemValues representing the
individual Drop Numbers. Some agents have multiple drop numbers; by adding
one or more DataItemValues, these will be available

© News Limited 2006 Page 8 of 17


Solution Delivery
Functional Specification – Customer Merge

Summary of Task WP005 – Create new contact type

The current Letters and Faxes functionality is driven from Contacts. To re-use as much of
this codebase as possible, Wrapper production should also be driven from Contacts.

A new contact type “Wrapper” should be created. This can then be linked to Wrappers
templates in the same was as contact types are linked to Letters, via the Edit Contact/Edit
Offer Letters screens as shown in section 3.6 of the functional specification.

Summary of Task WP006 – Create stored procedure

As part of a separate unit of work, a new table-based function fnAdrian is being created
and will be available for this unit of development. The data returned by this function will
form the basis of the data used to drive Wrapper production.

An example of the intended output from this function can be seen in the Functional Test
database table BO_SupplyHistory.

The function will take three arguments – a Division ID, Start and To dates. The table that
it returns will contain the following three fields: -

CustAgentId (int) - the agent ID


SupplyDate (date) - the date of publication (time always 00:00:00 i.e. the entire day)
QTY (int) - quantity of publications sold on that date (by that agent)

From the data returned by fnAdrian, it will be possible to determine the exact set of
CustSupplies shipped to the required agents (i.e. those requiring wrapper production) on
any given date. The CustAgents table can be joined to CustSupplyProducts (and thence to
CustSupplies) and also to CustSupplyAddresses. There will be no need for any filtering
to determine the currency of supplies, as this logic is already provided in the table
structure.

The Groupings for wrapper production (functional spec 1.1.2) will stipulate a day of
production and a day for publication, it is likely that the stored procedure that will use
these results will take only a single date parameter, that being the day on which
publication is for and thus that which we are interested in.

Sample output from BO_SupplyHistory is given in appendix 1, and a skeleton stored


procedure in Appendix 2. Note that data must be grouped (see WP009).

© News Limited 2006 Page 9 of 17


Solution Delivery
Functional Specification – Customer Merge

Summary of Task WP007 – Create list class

The result set produced by the stored procedure created in WP006 must be encapsulated
in a custom list class for processing by the batch job. This class should derive from the
ActiveReadOnlyCollectionBase class and will provide a means for the batch job to iterate
the set of results returned.

Example implementations for reference can be found in several classes within the Objects
assembly, including CustomersList, CustomerNotificationsList and CustomersToBillList
within NSS.Objects.Customers.

Summary of Task WP008 – Create wrapper templates

Wrapper templates will be required for: -

• The Wrapper Header Page


• The Master Wrap
• Single and Multiple-copy Wrappers

These templates can be created using built-in NSS template-creation functionality and the
resulting data scripted for synchronization with test/production environments.

Samples of the current FACOM-produced wrappers are in appendix 3 (reproduced from


the functional specification).

© News Limited 2006 Page 10 of 17


Solution Delivery
Functional Specification – Customer Merge

Summary of Task WP009 – Create C# batch job

A new batch job class must be created to invoke the stored procedure (WP006) and
produce wrappers from a combination of the data returned and the wrapper templates
(WP008). The current Letters and Faxes codebase can be leveraged to achieve this.

Data should be returned in the order in which it is required by the DBPL ordering
requirements, which will allow wrappers to be grouped together as required. The
groupings required (in order) are: -

1. Product
2. Publication Date
3. Wrapper type (single then multiple copies)
4. Agent Number
5. Drop Number
6. Customer surname

Product is therefore the top-level grouping. A Wrapper Header Page should be produced
for each Publication Date within a Product grouping.

Next, the set of all subscriptions with 1 copy come first. Within this grouping, all
customer surnames should be printed within a single drop sequence (Agent Number and
Drop Number). After this, if any subscriptions required a Master Wrap, this should be
produced at the end of the drop sequence, before moving onto the next.

Once all single-copy subscriptions have had wrappers produced, the batch job should
process all multiple-copy subscriptions in the same manner as described in the paragraph
above.

© News Limited 2006 Page 11 of 17


Solution Delivery
Functional Specification – Customer Merge

Unit test Summary

Test Summary

External Interfaces

Interface Summary

© News Limited 2006 Page 12 of 17


Solution Delivery
Functional Specification – Customer Merge

Appendix 1 – Sample BO_SupplyHistory output

The new function fnAdrian will return data in the same format as the presented in the
table BO_SupplyHistory (nsssql02\uat – SubscriptionsNationalFT).

Note the time portion of the date always being “00:00:00” – this means “for the whole
day”; each row shows the quantity of products supplied at the intersection of Customers
and Agents (CustAgentID) for the whole day.

© News Limited 2006 Page 13 of 17


Solution Delivery
Functional Specification – Customer Merge

Appendix 2 – Stored procedure skeleton

© News Limited 2006 Page 14 of 17


Solution Delivery
Functional Specification – Customer Merge

Appendix 3 – Wrapper templates

The following table represents the Mail Merge Fields required for the production of
Wrappers for DBPL.

No. Mail Merge Field DBPL


1 Date 
2 Agent Details 
3 Drop Number 
4 Recipient Title 
5 Recipient First Name 
6 Recipient Surname 
7 Recipient Address 1 
8 Recipient Address 2 
9 Recipient Address 3 
10 Product Description 
11 Customer Id 
12 Quantity 
13 Special / Delivery Instructions 

Wrapper Example – Single Copy


12 5 6 11
Page
Number 10
2 4
3 7
1 8

13

© News Limited 2006 Page 15 of 17


Solution Delivery
Functional Specification – Customer Merge

Wrapper Example – Multiple Copies


12 6 11

10
2
3 7
1 8

Wrapper Example – Master Wrap

10
2
Master Wrap
3 Free text.

Shading to denote
Wrapper is a Master
Wrap.

© News Limited 2006 Page 16 of 17


Solution Delivery
Functional Specification – Customer Merge

Wrapper Header Page

© News Limited 2006 Page 17 of 17

Das könnte Ihnen auch gefallen