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

Filter main picklist by project #40

Closed
rodrigopduarte opened this issue Feb 3, 2020 · 2 comments
Closed

Filter main picklist by project #40

rodrigopduarte opened this issue Feb 3, 2020 · 2 comments
Labels
question Further information is requested

Comments

@rodrigopduarte
Copy link

Here at the company we have several projects in DevOps and a unique process template.

Following the example of the extension with the fields Custom.MajorRelease and Custom.MinorRelease today we have different values between the projects for Custom.MajorRelase.

Custom.MajorRelease is configured with these values:

    Release Blue
    Release Red
    Release Orange
    Release Green

And the distribution of these values among the projects would have to be this way:

PROJECT A

   Custom.MajorRelease
       Release Blue
       Release Red

PROJECT B

   Custom.MajorRelease
       Release Orange
       Release Green

For this we configure the JSON of the projects as below. It turns out that Custom.MajorRelease always returns all registered values and does not filter only the values that are in JSON.

PROJECT A

Custom.MajorRelease
   Release Blue
   Release Red

{
  "version": 1,
  "cascades": {
      "Custom.MajorRelease": {
          "Release Blue": {
              "Custom.MinorRelease": [
                  "Blue.1",
                  "Blue.2",
                  "Blue.3"
              ]
          },
          "Release Red": {
              "Custom.MinorRelease": [
                  "Red.A",
                  "Red.B",
                  "Red.C"
              ]
          }
      }
  }
}

----

PROJECT B

Custom.MajorRelease
   Release Orange
   Release Green

{
  "version": 1,
  "cascades": {
      "Custom.MajorRelease": {
          "Release Orange": {
              "Custom.MinorRelease": [
                  "Orange.1",
                  "Orange.2",
                  "Orange.3"
              ]
          },
          "Release Green": {
              "Custom.MinorRelease": [
                  "Green.A",
                  "Green.B",
                  "Green.C"
              ]
          }
      }
  }
}

Is there a way to make this value filter between projects? If there is no way, would that be an interesting improvement for the extension?

Thanks!

@ByAgenT
Copy link
Contributor

ByAgenT commented Feb 3, 2020

Hey @rodrigopduarte. I think you can do a little trick to achieve that. Work item has a system field called System.TeamProject. It stores a name of a current project. You can try filter the values of Custom.MajorRelease by that field. For this case, configs should have the following cascades (I am assuming your projects are called PROJECT A and PROJECT B):

PROJECT A

Custom.MajorRelease
   Release Blue
   Release Red

{
  "version": 1,
  "cascades": {
      "System.TeamProject": {
          "PROJECT A": {
              "Custom.MajorRelease: [
                  "Release Blue",
                  "Release Red" 
              ]
          }
      },
      "Custom.MajorRelease": {
          "Release Blue": {
              "Custom.MinorRelease": [
                  "Blue.1",
                  "Blue.2",
                  "Blue.3"
              ]
          },
          "Release Red": {
              "Custom.MinorRelease": [
                  "Red.A",
                  "Red.B",
                  "Red.C"
              ]
          }
      }
  }
}

----

PROJECT B

Custom.MajorRelease
   Release Orange
   Release Green

{
  "version": 1,
  "cascades": {
      "System.TeamProject": {
          "PROJECT B": {
              "Custom.MajorRelease: [
                  "Release Orange",
                  "Release Green" 
              ]
          }
      },
      "Custom.MajorRelease": {
          "Release Orange": {
              "Custom.MinorRelease": [
                  "Orange.1",
                  "Orange.2",
                  "Orange.3"
              ]
          },
          "Release Green": {
              "Custom.MinorRelease": [
                  "Green.A",
                  "Green.B",
                  "Green.C"
              ]
          }
      }
  }
}

I hope this will work out for you. Let me know how it goes!

@rodrigopduarte
Copy link
Author

Hi @ByAgenT !!

Sensational! I added the configuration in JSON and everything worked as expected !!

Excellent extension !!

Thanks a lot for the help!!

Thanks !!

@vadim-kovalyov vadim-kovalyov added the question Further information is requested label Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants