Finaly I do:
diffs.each { diff ->
oldTicket.set(diff.propName, ticket.get(diff.propName))
}
ticketDoc.removeObject(ticket)
ticketDoc.save()
And I get history difference only updated field
Arnaud.
2013/3/19 Arnaud bourree :
> I just tr
I just try:
ticketDoc.removeObject(oldTicket)
ticket.setGuid(oldTicket.getGuid())
ticketDoc.save()
And I get unexpected history difference I suspect: object[0] is
deleted and object[1] is added, so not compared together.
Arnaud.
2013/3/18 Arnaud bourree :
> Th
Thanks, that right test should be if (diffs.size() == 0)
But an new object is created anyway
Arnaud.
2013/3/18 Edo Beutler :
> Hi Arnaud
>
> I'm not sure, but I suspect you just flipped the if statement. Shouldn't
> the document be saved when "diffs.size() != 0" instead? Everything else
> looks
Hi Arnaud
I'm not sure, but I suspect you just flipped the if statement. Shouldn't
the document be saved when "diffs.size() != 0" instead? Everything else
looks ok to me if I understood correctly what you try to do.
if (diffs.size() *!=* 0) {
println "none"
} else {
println "Updated"
ticket
Hello,
I'm prototyping a connector to a ticket tracking tool: I'm writing a
Groovy page which import CSV calls into XWiki.
I map each CSV rows to one XWiki object store in one page (one object per page).
OK, I succeed to to it.
My issue is that imported CSV contains rows (tickets) which don't
cha