[
https://issues.apache.org/jira/browse/AIRAVATA-3276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17013003#comment-17013003
]
Marcus Christie commented on AIRAVATA-3276:
-------------------------------------------
Data migration:
{code:sql}
-- replace toggle with is isRequired
update APPLICATION_INPUT
set METADATA = REGEXP_REPLACE(METADATA, '"toggle": \\[[^}]+\\]', '"isRequired":
true')
-- showOptions has "toggle" but not "isRequired"
where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
and NOT METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
;
{code}
{code:sql}
-- remove toggle since isRequired is already there
update APPLICATION_INPUT
set METADATA = REGEXP_REPLACE(METADATA, '(, )?"toggle": \\[[^}]+\\](, )?', '')
-- showOptions has BOTH "toggle" and "isRequired"
where METADATA rlike '"showOptions": {"toggle": \\[[^}]+\\]'
and METADATA rlike '"showOptions": {.*"isRequired": (true|false)'
;
{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: Marcus Christie
> 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
--
This message was sent by Atlassian Jira
(v8.3.4#803005)