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

Apply metadata setter for default to conditionals #7197

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft

Apply metadata setter for default to conditionals #7197

wants to merge 3 commits into from

Conversation

pvanheus
Copy link
Contributor

@pvanheus pvanheus commented Jan 9, 2019

The existing code only expects the case like:

<actions>
                <action name="column_names" type="metadata" default="Geneid,${alignment.element_identifier}" />
</actions>

whereas a conditional can be inserted within <actions> yielding a case like:

        <actions>
            <conditional name="format">
                <when value="something_good">
                    <action type="metadata" name="column_names" default="one,two,three" />
                </when>
            </conditional>
        </actions>

The fact that this is not handled causes the display logic to fail when column_names is set for a tabular dataset inside such a conditional. This patch provides a solution for that case.

The existing code only expects the case like:

```
<actions>
                <action name="column_names" type="metadata" default="Geneid,${alignment.element_identifier}" />
</actions>
```

whereas a conditional can be inserted within `<actions>` yielding a case like:

```
        <actions>
            <conditional name="format">
                <when value="something_good">
                    <action type="metadata" name="column_names" default="one,two,three" />
                </when>
            </conditional>
        </actions>
```

The fact that this is not handled causes the display logic to fail when `column_names` is set for a tabular dataset inside such a conditional. This patch provides a solution for that case.
@galaxybot galaxybot added this to the 19.05 milestone Jan 9, 2019
<data format="tabular" name="output">
<actions>
<conditional name="variable">
<when value="1">
Copy link
Member

Choose a reason for hiding this comment

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

@pvanheus can you fix the indentation here and below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've committed a version with new indentation - is this better?

@jmchilton
Copy link
Member

Maybe I'm confused but there doesn't seem to be anything conditional about this logic. This commit (jmchilton@98f273f) on top of your branch adds a second test case in a conditional and causes the first test to fail.

@jmchilton
Copy link
Member

I'm going to put this into WIP until that test passes, is that okay?

@jmchilton jmchilton modified the milestones: 19.05, 19.09 Apr 16, 2019
@martenson martenson modified the milestones: 19.09, 20.01 Aug 22, 2019
@mvdbeek mvdbeek modified the milestones: 20.01, 20.05 Dec 17, 2019
@mvdbeek mvdbeek modified the milestones: 20.05, 20.09 Apr 20, 2020
@mvdbeek mvdbeek removed this from the 20.09 milestone Sep 16, 2020
@nsoranzo nsoranzo marked this pull request as draft September 17, 2022 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants