Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-62591

An option provided by the function 'cascadeOption' for the field does not exist

      Problem

      Attempting to JQL search for cascading select values results in an error like:

      An option provided by the function 'cascadeOption' for the field 'testcascadefield' does not exist.
      
      

      Steps to Reproduce

      • Have a cascading select field (i.e. testcascadefield) with at least 2 defined contexts. Let's call them ContextA and ContextBC
        • ContextA is configured for ProjectA
        • ContextB is configured for 2 projects: ProjectB and ProjectC
      • Now configure the value options of ContextA and ContextB to have overlap
        • For example, let's say both allows for selecting the value "foobar"
      • Ensure that your account does not have "Browse" permissions to ProjectB and ProjectC
        • This is the key trigger of the bug
      • Now running the JQL:
        testcascadefield in cascadeOption("foobar")
        
        
      • We get the error:
        An option provided by the function 'cascadeOption' for the field 'testcascadefield' does not exist.
        
      • Now, if we grant the user account to either "Browse" permissions to either ProjectB or ProjectC, the error does not occur.

      So the problem occurs on 2 conditions:

      1. if there is a context containing no projects that the user account can see
        • As long as there's at least 1 project in the context viewable to the user, then the error does not occur.
      2. if there is a option in the context that is the same value as another context

      Expected Behaviour

      If an user does not have access to projects defined within a field's context, this should not affect the results for contexts that the user does have proper access to

      Actual Behaviour

      No issues are returned and the user is instead presented with an error

      Workaround

      1. Avoid using the function. "cascadeOption". So from the above example, use this instead:
        testcascadefield in ("foobar")
        
      1. Or check each context to ensure that the user has access to at least one of the projects listed
        1. Note, you can create a blank project without any issues, assign it to a restricted context of your cascading field, give all users "browse project" permissions, and cascadeOption JQL condition will work as intended after that, since all users will have access to at least 1 project in the restrictive context.
      2. Or avoid having multiple contexts with the same option values

       

            [JRASERVER-62591] An option provided by the function 'cascadeOption' for the field does not exist

            Hi, 

            We are facing this problem since several months.  Please provide a solution. 

            Thanks

            catherine curier added a comment - Hi,  We are facing this problem since several months.  Please provide a solution.  Thanks

            Yan Zhou added a comment -

            It also affects Jira v9.4.21

            Yan Zhou added a comment - It also affects Jira v9.4.21

            Hi, 

            we also "suffer" this problem. We have noticed that it does not happened if the user is in the "jira-system-administrator" user group

            Improvement Engine Support added a comment - Hi,  we also "suffer" this problem. We have noticed that it does not happened if the user is in the "jira-system-administrator" user group

            Dear Atlassian Team,

            Our Company also using cascaded fields with different contexts and overlap in their options. We are also waiting to have a fix of this error.

            Ferenc Ghido added a comment - Dear Atlassian Team, Our Company also using cascaded fields with different contexts and overlap in their options. We are also waiting to have a fix of this error.

            Good afternoon 

            We are still having issues with this and are using Jira software version 8.13.6. Please let us know if it has been fixed or if there are any reliable workarounds for this

            Arkansas Department of Human Services added a comment - Good afternoon  We are still having issues with this and are using Jira software version 8.13.6. Please let us know if it has been fixed or if there are any reliable workarounds for this

            Good morning,

            The problem persist in the Server's version 8.13.24

            It would be recommended that the issue was taked care or closed like in the related issue in Cloud JRACLOUD-74762, please.

             

            Regards.

            Javier Molina added a comment - Good morning, The problem persist in the Server's version 8.13.24 It would be recommended that the issue was taked care or closed like in the related issue in Cloud JRACLOUD-74762 , please.   Regards.

            Same problem here, after granting user access to another project it start work, but of course we dont want him to have access to that project.

            Martin Ninaj added a comment - Same problem here, after granting user access to another project it start work, but of course we dont want him to have access to that project.

            Siddartha added a comment -

            This is affecting lot of our users. Can this be changed to P2 ?

            Siddartha added a comment - This is affecting lot of our users. Can this be changed to P2 ?

            A user is unable to use his cascade select field in gadgets because of this bug that doesn't have a realistic workaround.

            Jason D Smith added a comment - A user is unable to use his cascade select field in gadgets because of this bug that doesn't have a realistic workaround.

            This may have been what Petr Novy mentioned in his comment, but we get this to work by using the custom field ID rather than the custom field name.  So, our JQL looks like this: cf[21801] in cascadeOption ("Option 1") for a search of just the first level.  Obviously, you need to know the custom field ID to get it to work.

            Bill Tanner added a comment - This may have been what Petr Novy mentioned in his comment, but we get this to work by using the custom field ID rather than the custom field name.  So, our JQL looks like this: cf [21801] in cascadeOption ("Option 1") for a search of just the first level.  Obviously, you need to know the custom field ID to get it to work.

              Unassigned Unassigned
              dchan David Chan
              Affected customers:
              74 This affects my team
              Watchers:
              63 Start watching this issue

                Created:
                Updated: