DBA Data[Home] [Help]

PACKAGE: APPS.JTF_TASK_SYNC_UPGRADE_PKG

Source


1 PACKAGE JTF_TASK_SYNC_UPGRADE_PKG AUTHID CURRENT_USER AS
2 /* $Header: jtftkugs.pls 115.0 2002/08/29 19:35:31 cjang noship $ */
3 /*======================================================================+
4 | DESCRIPTION                                                           |
5 |    This package is used to migrate the existing task data             |
6 |      so that they can work with synchronization function.             |
7 |                                                                       |
8 | NOTES                                                                 |
9 |                                                                       |
10 | Date          Developer        Change                                 |
11 | ------        ---------------  -------------------------------------- |
12 | 26-Aug-2002   cjang            Created.                               |
13 +=======================================================================*/
14 
15 -------------------------------------------------------------------------
16 --  This procedure is used to update invalid repeating appts.
17 --
18 --  With the prior release, the Repeating API had bugs and created
19 --  repeating appointments on dates that it should not have.
20 --  This has been fixed with the sync code.
21 --  This step will check if the repeating appointment series has all
22 --  the proper dates. If the dates are not correct, then this would
23 --  lead to an error during the sync. If the data migration would
24 --  encounter an appointment in the repeating series ( which was not
25 --  updated at all ) and the date was wrong, then the repeating rule
26 --  will be nullified for that appoinment. No appointments will be
27 --  deleted and no exclusions will be created.
28 --
29 --  The bugs on on recurrence API is categorized on four cases
30 --
31 --    1) Invalid dates
32 --       - Remove from repeating series.
33 --
34 --    2) Extra dates
35 --       - Remove from repeating series.
36 --
37 --    3) Missing dates
38 --       - Insert into the exclusion table.
39 --
40 --    4) Duplicate dates
41 --       - Remove from repeating series.
42 --
43 --  Note: This will not resolve any invalid start time or duration.
44 -------------------------------------------------------------------------
45 PROCEDURE update_invalid_repeating_appts;
46 
47 --------------------------------------------------------------
48 -- This procedure is used to initialize the new column
49 --   "object_changed_date" with 02-Jan-1970.
50 --------------------------------------------------------------
51 PROCEDURE initialize_object_changed_date;
52 
53 -----------------------------------------------------------------------
54 -- Prior to the recent changes in jtf_tasks_b.update_task, an inviter
55 --  could update an appointment in a repeating rule and
56 --  the updated appointments remained in part of the repeating series.
57 -- However, with the recent changes, if an inviter changes any field
58 --  in repeating appointments, it will be excluded.
59 -- Hence this script will compare LAST_UPDATE_DATE with CREATION_DATE.
60 -- If it's different, this script deems that the record has been
61 --  modified and needs to be excluded.
62 -----------------------------------------------------------------------
63 PROCEDURE exclude_modified_repeat_appts;
64 
65 ----------------------------------------------------------------------
66 -- This procedure is used to update jtf_task_recur_rules table
67 --  with occurs_number and end_date_active from generate_dates().
68 --
69 -- First of all, this script selects all recurrence rule records that
70 --   have null value in occurs_number or end_date_active.
71 -- And then, this procedure updates the columns with the values
72 --   generated by the API generate_dates().
73 ----------------------------------------------------------------------
74 PROCEDURE correct_recurrence_rule;
75 
76 ----------------------------------------------------------------------
77 -- This procedure is used to reset the assignment status
78 --  to Invited if the appt has the combination of assignment statuses
79 --   including Invited, Accepted and Rejected per assignee.
80 ----------------------------------------------------------------------
81 PROCEDURE reset_assignment_status;
82 
83 ---------------------------------------------------------------------
84 -- This is used to nullify all repeating series which have incorrect
85 -- assignments. If the number of total occurrence is different from
86 -- the number of assignments for an assignee,
87 -- we regards it as an incorrect assignment.
88 -- This means that an assignee has been assigned to some of
89 -- occurrences. Then we blindly nullify the recurrence rule id for
90 -- those repeating series because it's very hard to distinguish
91 -- the method of the assignee assignment allowed by sync module.
92 ---------------------------------------------------------------------
93 PROCEDURE nullify_wrong_assignments;
94 
95 END JTF_TASK_SYNC_UPGRADE_PKG;