[SCHEDULER-1055]  Provide Duplication for Plans, Observations, and ImageSets
Type Enhancement
Priority Medium
Severity Minor
Component Database Access Component, Schedule Browser, Web Schedule Browser
Fixed In Version [8.08.0
Versions Affected [3.5.33.5.3
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 12/15/2014

Description
See this Comm Center post by Bruce McMath.

On another item, it sure would be nice if a new image set within a plan would come already filled in with the data from the first image set. Something obviously would have to be altered but most of the time the coordinates and a few other items will be the same. 

 I'm right there with him on this. I have exported an image set then repeatedly imported it in order to add more that are similar (different filter only or whatever). 

The right way: Add Duplicate logic for Plan, Observation, and ImageSet.

Comments
4/7/2015 8:43:52 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 581
Affected files /trunk/Database/Database.cs (Modified)
Check-in comment Fix duplication logic for names containing regex control characters GEM:1055
4/7/2015 7:31:04 AM   Bob Denny
REOPENED

See this Comm Center  thread by Chris Cappelli. Duplication logic trips over regex control characters in Plan names (he has alternation "|" in his). Need to revise the search expression. It also should anchor the () to the end of the name, to avoid catching (nn) forms within the Plan name.
1/24/2015 4:14:18 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 510
Affected files /trunk/ACP Web Content/ACP-WebDocs-sc/seditimg.asp (Modified)
/trunk/ACP Web Content/ACP-WebDocs-sc/seditobs.asp (Modified)
/trunk/ACP Web Content/ACP-WebDocs-sc/seditplan.asp (Modified)
/trunk/ACP Web Content/ACP-WebDocs-sc/stree.asp (Modified)
/trunk/Browser/BrowserForm.cs (Modified)
/trunk/Help/RelNotes.htm (Modified)
/trunk/SchedulerSetup/SchedulerSetup.vdproj (Modified)
Check-in comment More enabling/disabling for running Plans and other tweaks. This looks good now. GEM:1055
1/23/2015 5:05:56 PM   Bob Denny
Finished up the desktop schedule browser with UI fixes and also some disabling of context menus for running plans that weren't there (slipped thru cracks).
1/22/2015 6:34:24 PM   Bob Denny
Now need to fix the display issues on the desktop browser when duplicating. This worked perfectly on the web schedule browser!!! Wow!!!
1/22/2015 6:32:28 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 508
Affected files /trunk/Database/Database.cs (Modified)
Check-in comment Checkpointing. The Database Duplicate() calls now make deep copies with (n) disambiguation like Windows. Man this was a bitch. GEM:1055
1/22/2015 2:59:45 PM   Bob Denny
Several problems with this.
  1. These copies need to be deep copies
  2. If the parent Observation is enabled, the duplicate ImageSets need to be pre-enabled.
  3. Do not allow duplication within running plan, or on failed objects. 
1/21/2015 3:26:07 PM   Bob Denny
REOPENED.  This should duplicate the entire tree below the item. This will be painful. The Duplicate() functions in the Database object will become complex.Fortunately the sub-objects already have Duplicate() functions that I can call to recursively make the new tree.

Added 16 hours to this.
12/17/2014 8:21:47 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 486
Affected files /trunk/ACP Web Content/ACP-WebDocs-sc/seditimg.asp (Modified)
Check-in comment That's it for duplicate in the Desktop and Web schedule browsers! GEM:1055
12/16/2014 7:24:09 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 485
Affected files /trunk/ACP Web Content/ACP-WebDocs-sc/seditimg.asp (Modified)
/trunk/ACP Web Content/ACP-WebDocs-sc/seditobs.asp (Modified)
/trunk/ACP Web Content/ACP-WebDocs-sc/seditplan.asp (Modified)
/trunk/Database/Database.cs (Modified)
/trunk/Database/Database.csproj.user (Modified)
Check-in comment Checkpoint on this issue - Web Schedule Browser: Duplicate Plan, Duplicate Observation done, tested. DupeObs required a change to Database.Observation.Duplicate(). The seditimg is done but not tested. MUST BE TESTED. GEM:1055
12/16/2014 12:18:57 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 484
Affected files /trunk/Browser/BrowserForm.cs (Modified)
/trunk/Browser/BrowserForm.resx (Modified)
/trunk/Database/Database.cs (Modified)
/trunk/Help/RelNotes.htm (Modified)
Check-in comment Add Duplicate() methods to Plan, Observation, and ImageSet database wrapper classes. Add context menu logic to Desktop Schedule Browser for duplicating these objects. Still need changes to Web Schedule Browser. GEM:1055
12/16/2014 12:16:04 PM   Bob Denny
Refactored, moving the Plan duplication logic into the Database.Plan class. Others into their own classes. This is working nicely now in the Desktop Schedule Browser. Onward to the Web Schedule browser!
12/15/2014 8:30:20 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 483
Affected files /trunk/Browser/BrowserForm.cs (Modified)
/trunk/Browser/BrowserForm.resx (Modified)
/trunk/Database/Database.cs (Modified)
Check-in comment Checkpointing, have Duplicate Plan working. GEM:1055
12/15/2014 8:28:53 PM   Bob Denny
OK I have Duplicate Plan working in the Desktop Schedule Browser. The Database wrapper has a DuplicatePlan() method that does the heavy lifting and will also be called from the web Schedule Browser.

Checkpointing...
12/15/2014 5:40:37 PM   Bob Denny
Comprehensive solution. Add Duplicate() methods to Plan, Observation and ImageSet.
12/7/2014 12:39:02 PM   Bob Denny
What if you added DUPLICATE items to the menu/forms?