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

If a users selects a file, the default uri also gets logged #11

Closed
bermud opened this issue Feb 11, 2016 · 10 comments · Fixed by #17
Closed

If a users selects a file, the default uri also gets logged #11

bermud opened this issue Feb 11, 2016 · 10 comments · Fixed by #17
Assignees
Labels
Milestone

Comments

@bermud
Copy link
Contributor

bermud commented Feb 11, 2016

Example from the log.xml. key="uri" should be null, if not is hard to know which one was ultimately tested.

<values>
   <value key="level">1</value>
   <value key="uri">https://developers.google.com/kml/documentation/KML_Samples.kml</value>    
   <value key="doc"><file-entry xmlns="http://www.occamlab.com/ctl" full-path="/srv/local/teamengine-prod/TE_BASE/users/testuser/s0001/example.kmz" media-type="application/vnd.google-earth.kmz" size="134800"/></value>
</values>
@keshavnangare
Copy link

keshavnangare commented Aug 14, 2018

@bermud @dstenger

This issue is appearing in all the tests if we have set the default value to URI then both values (iut-uri and iut-file) are logged in to log.xml.

The teamengine is responsible to set the form result not the ets so we need to update the teamengine and set null value to URI in case of the document is uploaded.

@keshavnangare
Copy link

keshavnangare commented Aug 28, 2018

Proposed implementation for fix:

  • Update form with common id attribute in all the ETS form for URI [id="iut_uri"] and document [id="iut_doc"].

  • Need to add validation Jquery validation in teamengine at one place instead of each form. Add onClick event on submit button with the validation method: onClick="return window.parent.validation()

  • Unset the iut_uri if the document was uploaded by user.

  • Add validation when both values are empty and generate alert with error message.

@keshavnangare
Copy link

keshavnangare commented Aug 28, 2018

@dstenger @bermud

I did all the changes as mentioned in the above comment and updated the ets-kml22 form accordingly.

I have tested this implementation with the ets-gml32 and ets-wfs20 and worked fine.

Commit: 6f96e97

Can you please review?

@keshavnangare
Copy link

Merge PR opengeospatial/teamengine#355 before this.

@lgoltz
Copy link
Contributor

lgoltz commented Nov 8, 2018

It makes sense to validate the input and as most ets have the possibility to pass an URL or file this can be done in the teamengine code. But I don't think it is necessary to fix the ids of the form inputs. Instead the values could be passed to the method 'validate'. Furthermore the name 'validate' should be more concrete, e.g. 'validateIutInputs'.

Unset the iut_uri if the document was uploaded by user.

I think this is the most important step. But I think this should not be done in the validate function (when the user clicks start), but when the user has uploaded a file.

@keshavnangare
Copy link

@lgoltz

Without ID filed how we can identify the filed by using values whether it is iut field or another field, it could be anything for e.g. schema URL or anything. We need ID or Name filed to clear the iut filed on the basis of file upload.

@lgoltz
Copy link
Contributor

lgoltz commented Dec 19, 2018

@keshav-nangare Sure, the ids are required to identify the form fields. But they should not be fix and stated in the teamengine. Instead pass the value to the teamengine code or pass the id to the teamengine code and retrieve the value with getElementById( passedID ).

@keshavnangare
Copy link

@lgoltz

I have updated the validation method to validateIutInputs('iut_uri', 'iut_doc') and we are pssing the ID's to the javascript method.

Unset the iut_uri if the document was uploaded by user.

I think this is the most important step. But I think this should not be done in the validate function (when the user clicks start), but when the user has uploaded a file.

Also I have created the new method resetIutValue(iut_uri, iut_doc), it will reset the iut_uri value if user has uploded a file. The method will call onChange event of the iut_doc (input="file") event.

@lgoltz
Copy link
Contributor

lgoltz commented Apr 23, 2019

@keshav-nangare

We discussed this issue again and decided to remove the example from the input field.
Please move the example to the text above the input field (replace (For example: 'http://org.com/myDocument.kml' or 'file://myDocument.kml') by (For example: 'https://developers.google.com/kml/documentation/KML_Samples.kml'). The input field should be empty by default.

Furthermore, please check if both (URL and file) are available when the user starts the test run.

@keshavnangare
Copy link

@lgoltz

Updated the form validation and moved the example above the input box and removed the default URL.

@dstenger dstenger assigned dstenger and lgoltz and unassigned keshavnangare Apr 30, 2019
@dstenger dstenger assigned keshavnangare and unassigned dstenger and lgoltz May 21, 2019
@dstenger dstenger assigned dstenger and lgoltz and unassigned keshavnangare Oct 1, 2019
@dstenger dstenger added this to the 1.15 milestone Jan 31, 2023
@dstenger dstenger added this to CITE Aug 1, 2024
@dstenger dstenger moved this to Done in CITE Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants