Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-13065

Assets not indexing an object properly - following its update in an Issue Transition

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: (yes)

      Assets CF1: IT Asset object referencing State and City

      Assets CF2: new State object to set as reference

      Assets CF3 (Reference to CF2): new City object to set as reference

      Two Insight Postfunctions are set in one transition, both are updating the same target object in CF1 with objects to reference (CF2 and CF3 - each into its respective Attribute

      The postfunction may work as expected a few times (3-5) then it seem that the IT Asset in CF1 is still showing the new State reference, but the old (wrong) City referenced, as if the "City" postfunction did not work.

      Re-indexing Assets and the IT Asset is showing the correct City.

      The log shows the error below, whenever the issue is reproduced.

      This is not reproducible in house.
      Tested with either postfunction types:
      Change Insight value into Insight object
      Set the value of an object attributes with a predefined value
      Changed the pf's order, and added a Groovy condition to one at a time:

      sleep(500); 
      return true

      The issue was still reproducible.

       

      Steps to Reproduce

      1. Create 3 object types: IT Assets, State, City
      2. Add two attributes to "IT Assets", to reference State and City respectively
      3. City should have a reference to the State OT
      4. Create a few objects of each type:
        ITAssetOBJ1, ITAssetOBJ2 (optional- set references to State and City)
        WashingtonState <<<< referenced by SeattleCity
        FloridaState      <<<<<referenced by MiamiCity
        CaliforniaState. <<<<<referenced by LACity
        etc.
      5. Create 3 Assets customfields and add them all to all issue screens / transition screens in a single project:
        Asset (object cf) - Filter Scope: objectType="IT Assets"
        State (object cf) - Filter Scope: objectType="State"
        City (Assets reference cf) - Parent: State cf, Reference direction: inbound
      6. Configure two post functions in a single transition ([ Change Insight value into Insight object|https://confluence.atlassian.com/servicemanagementserver0502/post-functions-1167737198.html#]) to set State and City respectively to the IT Asset object
      7. Execute the transition a few time, each time change the State and City

      (All tests were done on the same node - this is not a replication issue)

      Expected Results

      Each time the transition runs, the object in the Asset cf will show correctly the new State and City assigned to it in the transition

      Actual Results

      The transition works correctly for 3-5 times,  but then it may show wrong reference on the IT Asset object:
      State: Washington
      City: Miami
      Re-index Assets, and the City will now show Seattle correctly
      The log shows the following error when the postfunction is executes and the object is not indexed (the error does not show the same when the object is indexing correctly)

      023-05-18 09:20:10,244-0700 http-nio-8080-exec-2738 url: /secure/AjaxIssueAction.jspa; user: myUser WARN myUser 560x349017x1 s43pl4 10.102.13.174,10.101.184.108 /secure/AjaxIssueAction.jspa [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'. 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              da0dd4439f59 Alex Cooksey
              8cdc82c96fd5 Yinon Negev
              Votes:
              9 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: