Unable to change document type back to default properties

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Unable to change document type back to default properties

When a new document has been uploaded to our document library, it has a list of standard attributes in the properties field which are taken from the document itself. An example is a test word document I have uploaded:

Name: TestWordDoc.docx
Title: (None)
Description: (None)
Author: Chris
Mimetype: Microsoft Word 2007
Size: 143 KB
Creator: admin
Created Date: Mon 20 Apr 2020 15:39:10
Modifier: admin
Modified Date: Mon 20 Apr 2020 15:39:10

We have created a model which can be selected from the 'Change Type' action, which then adds additional properties:

Name: TestWordDoc.docx
Title: (None)
 Document Owner: (None)
 Document Approver: (None)
 Procedure: (None)
Description: (None)
Mimetype: Microsoft Word 2007
Size: 143 KB
Author: Chris
Created Date: Mon 20 Apr 2020 15:39:10
Modifier: admin
Modified Date: Mon 20 Apr 2020 15:44:52
 
Not all documents are required to have these additional properties, The problem I have, is that if I assign this model type to my document in error and want to revert it back to the standard properties, if I click 'change type' again, there are no selections (such as 'default') to choose to revert the change. Is anyone able to advise me how this can be done? Or would my only option be to create a second model configured with the default attributes?
2 Replies
Master

Re: Unable to change document type back to default properties

By default, all operation in Alfresco Share will only allow you to specialize the node type, never to generalise it. Generalisation means loss of metadata, and most customers / users would really try to avoid losing metadata by mistake (e.g. misclicking on the list of types).

Only via addons like the JavaScript Console can you access low level APIs to set the node type back to a more generalised one on the specific node. This functionality is only accessible to an administrator though. If you need something for a general user, then you would have to develop a small customisation yourself to expose this low level API functionality to end users.

Active Member II

Re: Unable to change document type back to default properties

Hi thanks for your reply.

I am an administrator of our Alfresco system and have been tasked with this requirement. So today I have created a model called 'Default properties', which I have mirrored the properties to exactly how a document that has not had a model applied to it would look. When I first upload a document, I am able to select 'Change Type' and it gives me the option of both models/types we currently have, however, if I select the model that has 'Document Owner' etc in it, then try to change the type to the default type that I created, there are no types listed. It is as if once one type has been assigned to a document, that it cannot be removed or changed, which in the event that you apply the wrong type to a document, that you must delete the document and then re-upload it again to be able to change its type again.

So in the event that I am unable to create a type and assign it to the document in the scenario above, are you able to advise how as an admin I would be able to do this through the java console?