Hello Flavien, in our submission process we add metadata automatically. I don't think that the curation tasks are intended for that. We wrote a separate submission step that runs without any user interaction and configure it in the '[dspace-src]/dspace/config/item-submission.xml'. For example:
''' <step> <processing-class>org.dspace.submit.step.AddMetadata</processing-class> <workflow-editable>false</workflow-editable> </step> ''' Our step extends the 'AbstractProcessingStep' (http://demo.dspace.org/javadocs/6/apidocs/org/dspace/submit/AbstractProcessingStep.html). In the method 'doProcessing' (http://demo.dspace.org/javadocs/6/apidocs/org/dspace/submit/AbstractProcessingStep.html#doProcessing) you can use the Context-object to get the current user. For the date I would use some Java standard way. To store all information in specific metadata fields, use the 'itemService.addMetadata'-method (http://demo.dspace.org/javadocs/6/apidocs/org/dspace/content/service/DSpaceObjectService.html#addMetadata). The Item-object that you need for this method will you get from the SubmissionInfo-object. I hope this helps and kind regards, Paul Münch Am 25.11.19 um 12:36 schrieb Flavien M: > Hello, > > I am currently trying to configure the input form. > I would like that at the end of the entry of an item some fields are > filled automatically. > > Examples: > - dc.redaction.author: automatically put the name of the user who just > typed the item; > - dc.redaction.datecreation: automatically set today's date. > > If I understand correctly, in DSpace the way to reach my goal is to > use the curation tasks. > > I created a > "/dspace/modules/additions/src/main/java/org/dspace/myproject/curate/AddMetadata.java" > task. > > But I did not understand how to activate this task. > > Here are my questions: > - How to enable this task to run automatically at the end of an item? > - How to retrieve the name of the active user (the one who is > entering) in the task? > - How to retrieve the date of the day in the task? > > I use DSpace 5.10 and XMLUI. > > PS : Sorry for my bad English this is not my native language. > > Thank you in advance. > Flavien > > -- > All messages to this mailing list should adhere to the DuraSpace Code > of Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > You received this message because you are subscribed to the Google > Groups "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/825c03e8-a8c2-46dc-91a9-457392799822%40googlegroups.com > <https://groups.google.com/d/msgid/dspace-tech/825c03e8-a8c2-46dc-91a9-457392799822%40googlegroups.com?utm_medium=email&utm_source=footer>. -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/1c109b5e-7dbd-298e-4e7d-e2057a0ef58b%40staff.uni-marburg.de.
signature.asc
Description: OpenPGP digital signature
