Skip to content

IA-5363: When creating a form via the Form AI and save, ask to indicate an OUT - #3405

Open
hakifran wants to merge 2 commits into
developfrom
IA-5363-AI-Form-creation-ask-to-indicate-an-OUT
Open

hakifran wants to merge 2 commits into
developfrom
IA-5363-AI-Form-creation-ask-to-indicate-an-OUT

Conversation

@hakifran

@hakifran hakifran commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What problem is this PR solving?

  • When creating a form via the Form AI and save, an OUT should be indicated and should be mandatory

Related JIRA tickets

IA-5363

Changes

  • An autocomplete component for OUT selection has been add
  • OUTs are filtered by the selected project
  • And the selected OUTs are saved with the rest of the Form parameters

How to test

  • Make sure the FORM AI module is activated for the current account
  • Set up the Anthropic api key for the current account
  • Go to Forms ---> Form AI
  • Create a new form through the prompt editor
  • When a Form is created, save it
  • A modal should appear on which OUTs can be selected

Print screen / video

Screencast.from.2026-10-08.12-01-09.webm

@hakifran hakifran changed the title When creating a form via the Form AI and save, ask to indicate an OUT IA-5363: When creating a form via the Form AI and save, ask to indicate an OUT Oct 8, 2026
@mestachs

mestachs commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@hakifran do you know if another jira propose to add orgunit groups or planned ? (this has been added a few weeks ago). If you add it then the require should be become at least a group or type.

formName.trim().length > 0 && selectedProjects.length > 0 && !isSaving;
formName.trim().length > 0 &&
selectedProjects.length > 0 &&
selectedOrgUnitTypes.length > 0 &&

@mestachs mestachs Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same condition appears nearly as-is at line 123 but "reversed"
I would extract a simple function canSaveNewForm(formName, selectedProject, selectedOrgUnitTypes)

@hakifran

hakifran commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@hakifran do you know if another jira propose to add orgunit groups or planned ? (this has been added a few weeks ago). If you add it then the require should be become at least a group or type.

@mestachs I searched the existing tickets and found none covering group selection when creating a Form AI. The standard Form creation already offers an OUGs dropdown, so we could reuse the same approach for Form AI.

@hakifran
hakifran requested a review from mestachs October 9, 2026 14:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants