Duplicate a Draft

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicate a Draft

BrunoBB
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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CALjxVcRCzK%3Du2SaUdkOJAb8YD07Mcw0T2sBQ%2BNR5SP3QChNE2w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a Draft

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1601955844954-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a Draft

BrunoBB
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

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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1602005368286-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a Draft

BrunoBB
In reply to this post by BrunoBB
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

El lun., 5 oct. 2020 a las 13:22, Bruno Buzzi Brassesco (<[hidden email]>) escribió:
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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CALjxVcQskL4HU%3Dn1ohjc9yZLVT%2BCdrC8gUiqEHwteYT2K6%2BNaw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a Draft

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1602112073714-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a Draft

BrunoBB
In reply to this post by BrunoBB
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

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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CALjxVcQ3x7wwk-_4VqQ-3QY9gb8qbGerqrp1kLQbCJ5JLpNipw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate a Draft

Alessandro  Vernet
Administrator
Perfect then!

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1602194846810-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet