Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-3982

Wrong value for scripted fields based on current user

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Done
    • Affects Version/s: 5.6.2.1-jira8
    • Fix Version/s: 5.6.9
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 66
    • Critical Points:
      0.2

      Description

      Script fields caching doesn't take account of the current user, it should do.

      Using a script field for user-specific information is a bad idea, because it means by definition you cannot index and search on it, as the search index would need to have a range of different values.

      A web panel is a better option for this kind of data.

      Another workaround is to disable the cache, which caches values for 10 seconds, providing various inputs are unchanged.

      You can disable the cache by adding:

      ENABLE_CACHE = { -> false }
      

      to your script.

      However to avoid any possible security issues this change will be to add the current user as an input to the cache key, so a user will not get the cached value for another a user.

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            jechlin Jamie Echlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: