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

Versioning: show version on Form Builder summary page #1795

Open
ebruchez opened this issue Jun 24, 2014 · 9 comments
Open

Versioning: show version on Form Builder summary page #1795

ebruchez opened this issue Jun 24, 2014 · 9 comments

Comments

@ebruchez
Copy link
Collaborator

ebruchez commented Jun 24, 2014

Currently, the Form Builder Summary page doesn't show any published form version information.

One reason for this is that Form Builder deals with data stored in orbeon_form_data, and only pushes to orbeon_form_definition upon publish. So it doesn't have any information about published forms. This has been found confusing to some, BTW.

One way to change this would be to have FB only deal with orbeon_form_definition. We would need to:

  • support the notion of an "in progress" form definition
  • also support regular FR autosave drafts
  • support Summary page access in particular search

However, this is a big task.

In the meanwhile, we could choose a simpler path, as follows:

  • form definitions keep a new "version" metadata
  • this would show on the FB Summary page in a new column
  • initially, this would be N/A
  • upon Publish
    • about to be published version is stored in metadata
    • form definition is saved (2016-03-21: Since 2016.1 we save the form definition just before publishing.)
    • form is published
      • Q: What if this fails? Shouldn't have version metadata saved.
  • upon editing
    • if there is no existing version, nothing to do
    • if there is an existing version, as soon as the user makes a change to the form, add a "changed" flag to indicate that the form has been changed
  • Summary page shows column
  • edit source
    • we don't want to mess with the version by mistake here
    • before replacing source, copy form version metadata aside, and restore it
    • possibly allow user to edit last published version in edit form metadata dialog?
@ebruchez
Copy link
Collaborator Author

See also #1138. The idea there was to run, on the FB Summary page, the /form API. This would allow us to show information which is directly in sync with published forms:

  • whether the form is available or not
  • the version(s) the form is actually published under (/form should then also return version information, right now it doesn't, and this would also be useful for the FR Home page!)

@ebruchez
Copy link
Collaborator Author

+1 from customer

@ebruchez
Copy link
Collaborator Author

ebruchez commented Jun 26, 2014

If doing this, could also do #1100 at the same time.

@ebruchez ebruchez modified the milestones: 4.7, Consider for 4.7 Jun 26, 2014
@ebruchez ebruchez modified the milestones: 4.8, 4.7 Sep 2, 2014
@ebruchez
Copy link
Collaborator Author

ebruchez commented Sep 2, 2014

Moving to 4.8 now, but we might ship it as a patch to customer before that.

@avernet avernet changed the title FB: Show version metadata FB: Show form version on Form Builder summary page Oct 17, 2014
@avernet avernet changed the title FB: Show form version on Form Builder summary page Show form version on Form Builder summary page Oct 17, 2014
@avernet avernet removed this from the 4.8 milestone Oct 17, 2014
@ebruchez ebruchez added this to the 4.8 milestone Oct 17, 2014
@ebruchez
Copy link
Collaborator Author

Putting back 4.8 milestone as this is relatively high on customer priority. To review with @avernet.

@ebruchez ebruchez modified the milestones: 4.8, 4.9 Nov 17, 2014
@ebruchez
Copy link
Collaborator Author

+1 from customer

@ebruchez ebruchez removed this from the 4.9 milestone Mar 17, 2015
@ebruchez ebruchez changed the title Show form version on Form Builder summary page Versioning: show version on Form Builder summary page Mar 24, 2016
@ebruchez
Copy link
Collaborator Author

+1 from customer

@ebruchez
Copy link
Collaborator Author

ebruchez commented Apr 1, 2022

We still have two possibilities, possibly not exclusive:

  1. What this issue is about, namely store a last-published-version metadata in the form definition. This as the benefit of simplicity, but the drawback of possible in correctness, for example if a form definition is published separately via the Publish API instead of directly from Form Builder.
  2. Using the Form Metadata API in the Form Builder Summary page to show the actual information about published form definitions and merge it.

Solution 1 appeared easier to implement, which is why we still considered it. See also this comment on #1138 regarding using stages.

@avernet
Copy link
Collaborator

avernet commented Apr 4, 2022

About option 1 in #1795 (comment), I also favor ease of implementation, but it looks to me like such denormalization would create a number of issues down the road, in what we could think are corner cases, and I'd bet sure some customers will hit those corners ;). For instance, this information stored in the "Form Builder form definition" might get outdated on a remote when a new form definition is published from the Form Runner home page, or something changes at the databases-level or database-configuration-level (properties-local.xml changed to point to a different database for published forms, backup of published forms restored…).

tl;dr -1 on storing last-published-version metadata in the form definition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants