Commit 735cb183 authored by Ludovic Dubost's avatar Ludovic Dubost
Browse files

Added support for attachment date and author formatting

parent 6ab20f65
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
* See the NOTICE file distributed with this work for additional * See the NOTICE file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
...@@ -302,6 +303,19 @@ public class GitLabGroovy { ...@@ -302,6 +303,19 @@ public class GitLabGroovy {
clonedDoc.setVersion("1.1"); clonedDoc.setVersion("1.1");
} }
// Update attachment dates
for (xa in clonedDoc.getAttachmentList()) {
debug("Checking attachment " + xa.getFilename())
if (defaultDate &amp;&amp; defaultDate!="") {
xa.setDate(defaultDate)
}
if (withFormat) {
xa.setAuthor(DEFAULTAUTHOR);
} else if (defaultUser &amp;&amp; defaultUser!="") {
xa.setAuthor(defaultUser);
}
}
clonedDoc.setComment(""); clonedDoc.setComment("");
clonedDoc.setMinorEdit(false); clonedDoc.setMinorEdit(false);
def c = clonedDoc.toXML(true, false, true, false, context.getContext()) def c = clonedDoc.toXML(true, false, true, false, context.getContext())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment