Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fr:mode() to return edit when editing autosaved data #5066

Closed
avernet opened this issue Nov 24, 2021 · 1 comment
Closed

fr:mode() to return edit when editing autosaved data #5066

avernet opened this issue Nov 24, 2021 · 1 comment

Comments

@avernet
Copy link
Collaborator

avernet commented Nov 24, 2021

Currently, fr:mode() returns:

  • new if opening the /new page, there is only 1 autosaved form data, and the user chooses to open it.
  • edit if the user chooses to open the autosaved data from the summary page.

Instead, we want fr:mode() to return edit in both cases. This would enable form authors to have a service called only once, the first time a user goes to /new, and not have it called a second time when users edit that autosaved data.

Related issue: #5060.

+1 from customer

@avernet avernet self-assigned this Nov 24, 2021
@avernet avernet added this to To do in Orbeon Forms 2021.1 via automation Dec 18, 2021
@avernet
Copy link
Collaborator Author

avernet commented Dec 18, 2021

@ebruchez ebruchez moved this from To do to In progress in Orbeon Forms 2021.1 Dec 22, 2021
Orbeon Forms 2021.1 automation moved this from In progress to Done Dec 25, 2021
avernet added a commit that referenced this issue Dec 25, 2021
- When selecting a draft from `new`, try switching to `/edit/123`, for
  consistency with what we do when the draft is opened from the summary
  page.
- Compute authorized permissions after the draft is opened, as they
  might be different from those we have on `/new`.
- Keep track of whether a draft is open, exposed with `fr:is-draft()`.
avernet added a commit that referenced this issue Dec 27, 2021
- Calling `process:runProcessByName()` was failing because the `process`
  prefix wasn't declared anymore.
- We should have been calling `fr:run-process-by-name()` anyway.
avernet added a commit that referenced this issue Dec 27, 2021
- Calling `process:runProcessByName()` was failing because the `process`
  prefix wasn't declared anymore.
- We should have been calling `fr:run-process-by-name()` anyway.
ebruchez pushed a commit that referenced this issue Dec 27, 2021
- Calling `process:runProcessByName()` was failing because the `process`
  prefix wasn't declared anymore.
- We should have been calling `fr:run-process-by-name()` anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant