Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-81331

An option provided by the function 'cascadeOption' for the field does not exist (occurring for dashboard gadget 'Issue Statistics')

    XMLWordPrintable

Details

    Description

      Issue Summary

      Dashboard gadget "Issue Statistics" throws below  error attempting to JQL search for cascading select values :

      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 create a dashboard with gadget "Issue Statistics" and add below JQL in "Project or Saved Filter", Statistic Type as testcascadefield and Sort By Natural. Save the dashboard.
        "testcascadefield[Select List (cascading)]" in ("foobar") 
      • Once dashboard is ready, if you click on "foobar" it will give you below 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 Results

      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 Results

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

       

      An option provided by the function 'cascadeOption' for the field '
      testcascadefield[Select List (cascading)]' does not exist.
      
      

      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 full access to at least one of the contexts listed
      2. Or avoid having multiple contexts with the same option values

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              94f3fca682f8 Sayali Alhad
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: