Duplicate a Draft

已查看 9 次
跳至第一个未读帖子

Bruno Buzzi Brassesco

未读,
2020年10月5日 12:23:042020/10/5
收件人 orb...@googlegroups.com
Hi,

Why when duplicating a draft the service call is to:
'/crud/{3}/{2}/data/{1}/data.xml?data-format-version={4}'

Instead of:
'/crud/{3}/{2}/draft/{1}/data.xml?data-format-version={4}'

Is there any reason for this ?

The GemStone/S PL was expecting the second call (with draft in the route)...

regards,
bruno

BrunoBB

未读,
2020年10月5日 12:24:262020/10/5
收件人 orb...@googlegroups.com
Hi,

It is correct to duplicate a Draft ?

Because if i select to duplicate a draft the Orbeon process to duplicate
call:
'/crud/{3}/{2}/data/{1}/data.xml?data-format-version={4}'

Instead of:
'/crud/{3}/{2}/draft/{1}/data.xml?data-format-version={4}'

regards,
bruno

--
Sent from: http://discuss.orbeon.com/

Alessandro Vernet

未读,
2020年10月5日 23:44:082020/10/5
收件人 orb...@googlegroups.com
Hi Bruno,

Are you saying that when, from the summary page, you duplicate form data
that has been auto-saved, you end up with a copy of that form data, but not
marked as auto-saved?

The semantic of a duplicate on auto-saved data is also a bit unclear to me.
Right now:

- If there is no manually saved data for the same document id, i.e. users
went to `/new` and didn't save manually, it would be as if users went twice
to `/new` and did that. I guess this makes sense.
- But if there is manually saved data, then it would be as if some user went
to `/new` and created the draft this way.

Do you have a particular use case in mind for duplicating drafts?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet

Bruno Buzzi Brassesco

未读,
2020年10月6日 13:33:272020/10/6
收件人 orb...@googlegroups.com
Hi Alex,

There is no manually saved data.

In the summary there is an autosaved form, then this form is selected for duplication.

If i trace all service called to the PL to duplicate the form the at some point the following service is called:
'/crud/{app}/{form}/data/{id}/data.xml?data-format-version={version}'

My question is if this service should be called or following service should be called:
'/crud/{app}/{form}/draft/{id}/data.xml?data-format-version={version}'

Note that the only difference is 'data' and 'draft'.

It is something more semantic rather than a bug ;)

regards,
bruno

BrunoBB

未读,
2020年10月7日 13:22:232020/10/7
收件人 orb...@googlegroups.com
Hi Alex,

There is no manually saved data.

In the summary there is an autosaved form, then this form is selected for
duplication.

If i trace all service called to the PL to duplicate the form the at some
point the following service is called:
'/crud/{app}/{form}/*data*/{id}/data.xml?data-format-version={version}'

My question is if this service should be called or following service should
be called:
'/crud/{app}/{form}/*draft*/{id}/data.xml?data-format-version={version}'

Note that the only difference is 'data' and 'draft'.

regards,
bruno

Alessandro Vernet

未读,
2020年10月7日 19:07:562020/10/7
收件人 orb...@googlegroups.com
Hi Bruno,

The duplication API does not support auto-saved data, as it doesn't provide
a way for callers to specify whether the data to be duplicated was
auto-saved or not. I've added a precision about this in the documentation
(see 1st link below). And since the summary page is using this API, the
Duplicate button should be disabled when auto-saved data is selected. I've
created and fixed #4683 (see 2nd link below) for this. This will be in
2020.1.

https://doc.orbeon.com/form-runner/api/other-apis/duplicate-form-data#purpose
https://github.com/orbeon/orbeon-forms/issues/4683

I can conceptualize cases where one would like to duplicate some auto-saved
data (but not if there is a corresponding explicitly-saved document), but we
haven't come across that use case yet, so I think it is fine not to support
this for now. You'll let me know if this makes sense.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet

Bruno Buzzi Brassesco

未读,
2020年10月8日 13:26:592020/10/8
收件人 orb...@googlegroups.com
Alex,

Ok got it. To duplicate an autosave form is unimplemented/forbidden.
All you say makes sense to me.
About to release another version of the PL for GemStone/S and I was testing different things then I came across this issue.
So there is NO use case for autosave duplication (it was just a test).

regards,
bruno

Alessandro Vernet

未读,
2020年10月8日 18:07:292020/10/8
收件人 orb...@googlegroups.com
Perfect then!
回复全部
回复作者
转发
0 个新帖子