<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Remove rma:cutoff aspect from record in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102745#M29324</link>
    <description>&lt;P&gt;Did you looked at this post, might have helpful information pertaining to your use case:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/ecm-archive/javascript-unable-to-remove-record-cutoff/m-p/105037/thread-id/56046" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/ecm-archive/javascript-unable-to-remove-record-cutoff/m-p/105037/thread-id/56046&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2020 17:15:53 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-01-21T17:15:53Z</dc:date>
    <item>
      <title>Remove rma:cutoff aspect from record</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102742#M29321</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In our file plan, a retention schedule was assigned to a records category that really makes no sense but now means that the records contained within can no longer be moved or it's metadata edited.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Retention Steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 Cut Off after 2 year(s)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 Retain after 1 year(s)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After a record makes it through the above steps, we can no longer undo the cutoff which then means there's no way to edit the metadata or move the record to another folder.&amp;nbsp; The undoCutoff action is no longer available when a record reaches the end of this lifecycle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, this retention schedule should not have been set up this way but can anyone think of a way to remove the rma:cutoff aspect at least so the records can be re-filed to a properly setup category?&amp;nbsp; Worst case is that the record category is recreated with the proper disposition schedule and then the records are copied to it but that loses and existing links or history on these records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 19:23:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102742#M29321</guid>
      <dc:creator>niele</dc:creator>
      <dc:date>2020-01-18T19:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove rma:cutoff aspect from record</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102743#M29322</link>
      <description>&lt;P&gt;I am not exactly sure about the problem and impacts of removing aspect. However, to remove the aspect from documents you can create a cleanup webscript for finding the nodes matching certain condition and remove the aspect.&lt;/P&gt;
&lt;P&gt;E.g. :&lt;/P&gt;
&lt;P&gt;Make sure you execute the script as admin user&lt;/P&gt;
&lt;PRE&gt;main();

function main(){
        //example aspectName: rma:cutoff
	var aspectName = args["aspectName"];
        //example objectType (content type): rma:nonElectronicDocument
	var objectType = args["objectType"];
        //example site short name: rm
	var siteShortName = args["siteShortName"];
	var skipCount = (args["skipCount"]==null || args["skipCount"]==undefined)?0:args["skipCount"];
	var maxCount = (args["maxCount"]==null || args["maxCount"]==undefined)?100000:args["maxCount"];
	
	var successfulNodes = [];
	var errorNodes = [];
	//Append the folder path after document library if its known. 
	var query = 'PATH:"/app:company_home/st:sites/cm:' +siteShortName+'/cm:documentLibrary//*" AND TYPE:"'+objectType+'" AND ASPECT:"'+aspectName+'" AND NOT ASPECT:"cm:lockable"';
	var page = {
	  skipCount : parseInt(skipCount),
	  maxItems : parseInt(maxCount)
	};

	var searchQuery = {
	  query : query,
	  language : "lucene",
	  page : page
	};
	
 	logger.log("Search Query: "+query)
 	var nodes = search.query(searchQuery);
 	logger.log("Resulted nodes: "+nodes.length)

	for each(node in nodes) {
		try {
			if(node.hasAspect(aspectName)){
			   node.removeAspect(aspectName);
			   successfulNodes[node.nodeRef] = node.name+" - Aspect Removed!";
			}
		} catch(ex) {
			logger.log("Failed to remove aspect due to: "+ex.message);
			errorNodes[node.nodeRef] = node.name+" - Aspect could not be removed due to: "+ex.message;
		}
	}
	model.successfulNodes = successfulNodes;
	model.errorNodes = errorNodes;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jan 2020 15:29:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102743#M29322</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-01-21T15:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remove rma:cutoff aspect from record</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102744#M29323</link>
      <description>&lt;P&gt;Thanks for the feedback, the problem here is that the aspect is protected so trying to do a node.removeAspect("rma:cutOff") results in:&lt;/P&gt;&lt;PRE&gt;Failed to execute script 'Javascript Console Script': 0021242095 The user admin does not have the permission to remove the protected aspect rma:cutOff&lt;/PRE&gt;&lt;P&gt;I also can't use the undoCutoff action like the following since the last disposition action was not a Cutoff:&lt;/P&gt;&lt;PRE&gt;var undoCutoff = actions.create("unCutoff");
undoCutoff.execute(node);&lt;/PRE&gt;&lt;P&gt;So I guess what I'm really asking is if it's possible to remove a protected aspect.&amp;nbsp; The goal is to be able to edit the metadata for these records without re-importing them as new records (and losing their history).&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 16:26:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102744#M29323</guid>
      <dc:creator>niele</dc:creator>
      <dc:date>2020-01-21T16:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Remove rma:cutoff aspect from record</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102745#M29324</link>
      <description>&lt;P&gt;Did you looked at this post, might have helpful information pertaining to your use case:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/ecm-archive/javascript-unable-to-remove-record-cutoff/m-p/105037/thread-id/56046" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/ecm-archive/javascript-unable-to-remove-record-cutoff/m-p/105037/thread-id/56046&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 17:15:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102745#M29324</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-01-21T17:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Remove rma:cutoff aspect from record</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102746#M29325</link>
      <description>&lt;P&gt;I have little different scenario here.&lt;/P&gt;&lt;P&gt;I wanted to automate the 'cutoff' of the records using rules.&lt;/P&gt;&lt;P&gt;But could not find a way.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 13:11:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/remove-rma-cutoff-aspect-from-record/m-p/102746#M29325</guid>
      <dc:creator>kintu_barot</dc:creator>
      <dc:date>2022-01-03T13:11:28Z</dc:date>
    </item>
  </channel>
</rss>

