select r.requestId, r.trackingId, r.rank, n.requestId noteRequestId, case when deployed = 'Y' then 4 when statusCode = 'X' then 2 when statusCode = 'B' then 2 else 3 end statusSort, coalesce( coalesce( firstCompletedDate, firstActiveDate ), dueDate ) sortDate, r.releaseName, fl.sortRank releaseRank, n.noteText deploymentNotes, r.deployed, r.statusCode, r.description from tbl_SCRUM_Requests r left outer join tbl_SCRUM_RequestNotes n on n.requestId = r.requestId and n.noteType = 'deployment' and n.ownerId = r.ownerId and n.ownerType = r.ownerType inner join tbl_SCRUM_FieldLookups fl on abs( fl.ownerId ) = r.ownerId and fl.ownerType = r.ownerType and fl.fieldName = 'REQ_RELEASENAME' and fl.selectionValue = r.releaseName where r.requestId = where statusCode in ( ) and deployed in ( ) and ( n.requestId is not null ) and r.releaseName <> 'Unplanned' and r.releaseName = and r.assignedTo = and r.dueDate = select * from qmd_requestsWithDeploymentNotes where requestId in ( ) order by releaseRank, statusSort, rank, sortDate desc, trackingId desc
#htmleditformat( releaseName )# Release - Deployment Notes
Request Description Files
#_stats.trackingId# #htmleditformat( _stats.description )# #lsnumberformat( _stats.filesChanged )#
  File Comments SCRUM
#_targetIdx#. #htmleditformat( _targets[_targetIdx])#
#htmleditformat( _deployNotes[_noteIdx])#
#htmleditformat( _scrums )#




gitSteps( _targets, "fse_dev", _stagingPath, qmd_requestsWithDeploymentNotes.description );


REM backup to site safe
copySource( _targets, "#_wwwroot#", "\\#_siteSafeServer#\FSE_Site_Safe\#url.backupFolder#\#url.deploymentName#", "backup");





REM pre-sql
deploymentSQL( _targets, "pre" );

REM copy to production
copySource( _targets, "#_devRoot#", "#_wwwroot#", "production");


REM update objects
REM #encodeforHTML( "http://mstrcfmod11.fsenablers.com/SYS/tools/updateDataObjectDictionary.cfm?datasource=fslibrary&object=*" )#

REM update version
/* run on live fslibrary db
update b
   set stpVersion = format( round( cast( stpVersion as float ), 0 ) + 1.0, '0.0' ),
       mobileCRMVersion = format( round( cast( mobileCRMVersion as float ), 0 ) + 1.0, '0.0' ) 
 from fsenablers..tbl_STP_Boot b
*/

REM post-sql
deploymentSQL( _targets, "post" );


-- *************************************************************
-- BEGIN SCRUM #htmleditformat( id )#
-- #htmleditformat( description )#
-- #htmleditformat( assignedToEmail )#
				
#htmleditformat( qmd_sqlNotes.noteText )#

-- END SCRUM #htmleditformat( id )#


sqlcmd /S fsedat07\fslibrary /U userName #encodeForHTML( _targetDir )##chr(13)##chr(10)# REM begin FSEDEF05 git work e: cd \telus-agcg\SE-Development #_gitOutput# git add "#arguments._from##_sourceDir#\#_targetFiles#" #_gitOutput# REM all staged files git diff --name-only --staged REM review all of the files above to ensure th pause REM to revert this command REM git restore --staged . REM to commit these two commands REM git commit -m "#arguments._message#" REM git push origin develop REM end FSEDEV05 git work REM begin FSEDEF06 git work git fetch origin git pull origin REM end FSEDEV06 git work #_gitOutput# robocopy "#arguments._from##_sourceDir#" "#arguments._to##_targetDir#" "#_fileSpec#" #_options# /NJH /NJS /NDL /NFL