[ 
https://issues.apache.org/jira/browse/AIRAVATA-3276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089746#comment-17089746
 ] 

Marcus Christie commented on AIRAVATA-3276:
-------------------------------------------

Pushing this change into production/master branch

- (/) Helix changes were already merged to master, but the migration script on 
branch airavata-3276 wasn't so I merged that branch
- (/) Django branch wasn't branched from master so I couldn't just merged it. 
Since it was a single commit, I just cherry picked that commit 
(01195f091273acf862c01b6e29cd3b3c00e3cacc).
- (/) Deploy Django portal in production
- (/) run database migration script
{code:sql}
MariaDB [app_catalog]> begin;
Query OK, 0 rows affected (0.00 sec)

MariaDB [app_catalog]> update APPLICATION_INPUT
    -> set METADATA = REGEXP_REPLACE(METADATA, '"toggle": \\[[^}]+\\]', 
CONCAT('"isRequired": ', IF(IS_REQUIRED=1, 'true', 'false')))
    -> -- showOptions has "toggle" but not "isRequired"
    -> where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
    ->   and NOT METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
    -> ;
Query OK, 28 rows affected (0.01 sec)
Rows matched: 28  Changed: 28  Warnings: 0
MariaDB [app_catalog]> commit;
{code}

> BUG: non uploaded files argument appears in command-line in job script
> ----------------------------------------------------------------------
>
>                 Key: AIRAVATA-3276
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3276
>             Project: Airavata
>          Issue Type: Sub-task
>          Components: Django Portal
>    Affects Versions: 0.18
>         Environment: https://seagrid.org/
>            Reporter: Eroma
>            Assignee: Anna Branam
>            Priority: Major
>             Fix For: 0.19
>
>
> 1. Created new application ABAQUS-6.14-1
> 2. In this application a file need to be uploaded as optional file.
> 3. This particular input also has an argument.
> 4. When the file is not uploaded the argument appears in command-line without 
> the file.
> 5. The argument should only appear with the filename when the file is 
> uploaded.
> h3. TODO
> - (/) Update backend to ignore inputs with requiredToAddedToCommandLine=true 
> when value is null or empty and isRequired=false 
> - (/) Automatically add "showOptions" configuration for toggling isRequired 
> - (/) Change "showOptions" metadata to {noformat}{"showOptions": 
> {"isRequired": true}}{noformat} with data migration
> -- need backwards compatibility with old schema in code
> h3. Production rollout
> - deploy backend changes - 
> https://github.com/apache/airavata/tree/airavata-3276
> - deploy frontend changes - 
> https://github.com/apache/airavata-django-portal/tree/AIRAVATA-3276--BUG--non-uploaded-files-argument-appears-in-command-line-in-job-script
> - run data migration script for frontend changes
> h3. Summary
> With these changes in place, admins no longer need to add special 
> configuration for dependent inputs that have isRequired=true or 
> requiredToAddedToCommandLine=true. The application interface editor will 
> automatically add {noformat}
> {"showOptions": {"isRequired": true}}
> {noformat}
> to the JSON configuration for a dependent input.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to