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

ReSetting::ARTIFACT_TYPES clone #10

Merged
merged 2 commits into from Feb 1, 2016

Conversation

Projects
None yet
2 participants
@marekswiecznik
Contributor

marekswiecznik commented Jul 15, 2015

There is a problem in lines 106-107 ( all_artifact_types.delete_if { |v| configured_artifact_types.include? v } ). If you add Requirements module to a project and save settings, then when you try to do the same thing in another project - ReSetting::ARTIFACT_TYPES is empty. I suggest cloning ReSetting::ARTIFACT_TYPES before delete_if in this context.

Failing use case:

  1. Enable Requirements in project A.
  2. Go to Requirements in project A, save settings.
  3. Enable Requirements in project B.
  4. Go to Requirements in project B, list of artifact types is empty. Save causes internal error.

marekswiecznik and others added some commits Jul 15, 2015

ReSetting::ARTIFACT_TYPES clone
There is a problem with line 107 (    all_artifact_types.delete_if { |v| configured_artifact_types.include? v }   ). If you add Requirements module to a project and save settings, then when you try to do the same thing in another project - ReSetting::ARTIFACT_TYPES is empty. I suggest cloning ReSetting::ARTIFACT_TYPES before delete_if in this context.

Failing use case:
1. Enable Requirements in project A.
2. Go to Requirements in project A, save settings.
3. Enable Requirements in project B.
4. Go to Requirements in project B, list of artifact types is empty. Save causes internal error.

tmerten added a commit that referenced this pull request Feb 1, 2016

Merge pull request #10 from marekswiecznik/patch-1
ReSetting::ARTIFACT_TYPES clone

@tmerten tmerten merged commit 1408705 into tmerten:master Feb 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment