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

Vedleggskomponent - valgfri #1763

Closed
hanneline opened this issue May 16, 2019 · 1 comment
Closed

Vedleggskomponent - valgfri #1763

hanneline opened this issue May 16, 2019 · 1 comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. kind/bug Used when there is a defect / something is not working as it should. status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design.
Milestone

Comments

@hanneline
Copy link

hanneline commented May 16, 2019

Describe the bug

Vedleggskomponenten står med valgfri etter ledeteksten. Men det er ingen steder vi kan sette om filvedlegg er valgfritt eller ikke. På komponenten kan man sette maks antall filer, men ikke minimum.

Expected behavior

Mulig å sette at det må leveres filvedlegg, og evt et minste antall.

Screenshots

image

Additional info

Windows 10 Pro, Chrome

Fix

We should add an input field with minimum number of attachments uploaded. If this value is more than 0, the attachment component is required by the end user and if the value is 0 the "valgfri" label should be applied to the component. A hard validation needs to be implemented in the application stopping the end user from continuing if they have not uploaded enough attachments. Default value for max and min number of attachments should be 1.

Acceptance criterea

  • Add an input field with "minst antall vedlegg" as label.
    • Size of this input field should be the same as "maks antall vedlegg"
    • Default value of this field should be 1.
  • If the value of this field is 0 the "valgfri" label should be visible for the end user on the attachment component.
  • If the user didnt upload enough attachments in regards to the "minst antall vedlegg" value they should get a validation message when they try to submit the form.
    • This validation message should contain how many attachments the user has to upload to reach the value. Example: "Du må laste opp 1 vedlegg for å fortsette".
  • For now we dont have any validation in the UI-editor, and that means we cant stop the user from setting the minimum value higher then the maximum value. This should be solved by Hard validations in the UI-editor (to stop or guide a app developers making stupid mistakes) #1841

Sketch

UI-editor
https://www.figma.com/file/O7Oqx6p9ZUZBt8DFBNanrymh/MVP-2-Altinn-Studio?node-id=1262%3A14124

Application
https://www.figma.com/file/O7Oqx6p9ZUZBt8DFBNanrymh/MVP-2-Altinn-Studio?node-id=1465%3A0

@hanneline hanneline added the kind/bug Used when there is a defect / something is not working as it should. label May 16, 2019
@gudrunvigerustfuru gudrunvigerustfuru added binary-attachments area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. labels May 23, 2019
@gudrunvigerustfuru gudrunvigerustfuru added this to the MVP.2 milestone May 23, 2019
@malmil malmil self-assigned this Jun 11, 2019
@trymen
Copy link
Contributor

trymen commented Jun 18, 2019

Tested all acceptance criteria (Can confirm setting a max number lower than min crashes in runtime), testcafe tests on vedlegg has been updated to catch this case. Closing this issue as fixed.

@trymen trymen closed this as completed Jun 18, 2019
@acn-sbuad acn-sbuad modified the milestones: MVP.2, v2019.25 Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. kind/bug Used when there is a defect / something is not working as it should. status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design.
Projects
None yet
Development

No branches or pull requests

5 participants