Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Is it possible that Jira caches field values ?


To get the value of a field I normal do:

Optional<CustomField> employeeCustomField =getCustomfieldByName(MAILCONTAKT_EMPLOYEE);
String employeeCustomFieldValue = (String) someIssue.getCustomFieldValue(employeeCustomField.get());

And normally it worked.

But now to test it , I cloned the issue with all its subissues. 

And I always update the respective field with a new value. Then I clone again and update again the field and so on.

First and second time in the log I saw it retrieved the new value.

But later even if I updated the field value in the issue , I curiously got the old value.

Even if I update again , I still get the old value. So all updating has no more effect.

That already cost me hours and hours. But I really do not know  why and how it can still get the old value.

1 answer

0 votes

Where are you running this?  And what is the rest of the script doing?

I run it in a postfunction outsourced to an own plugin

Ok, what does the rest of the postfunction do?

it calls a REST Api and sending the data retrieved from the issue fields.

Ok, so can you walk through replicating this problem?  You've talked about cloning and updating issues, but I think we need to see the whole thing (that's why I asked about the rest of the post-function - I didn't know if you were cloning/updating in there).  If you could sketch out something like:

  • Clone ABC-123 to create ABC-456
  • Amend field on ABC-456
  • Transition issue, going through my post-function that
    • Gets some data from <remote system>
    • Works out what to do with it
    • Updates the employee field (as per posted code)
  • And then say where the problem occurs - like "the employee field on ABC-456 remains as what was on ABC-123", or "I clone ABC-456 and do exactly the same process creating ABC-789, but the employee field takes on the value from ABC-123"

That would be really helpful

There is a issue of type order . And it has subissue connected to it of type person

So I trigger a postfunction in order and it will read field contactaddress from person and send it to backend. So because I cannot trigger the postfunction again , I need to clone the order issue with person issue will also be connteced to the clone. If I now change value of field contactaddress in person and again trigger the clone order issue I would expect that the updated value will be sent to backend . But this is not the case. Instead old value is read and sent to backend. Honestly I do not know where this old value is available. Really weird.

I am sorry, but I am struggling to understand what your process steps are there.  Could you go over it again, but use Jira actions to explain it, and differentiate between the different issues? 

It is unclear what your "need to clone" and "send to back end" mean, and what issue you are talking about.  I understand that you have an order issue type and a person issue type, but there are at least three separate issues involved in your walkthrough and I cannot tell which ones you are talking about when you just say "order" or "person"

We really do need to have this done in jira-speak - something like:

  • I create a new issue (type order), it gets called ABC-123
  • I create three sub-tasks beneath it (type person), they are ABC-124, ABC-125, ABC-126
  • I transition ABC-123 from "new" to "in progress", which makes my post-function run
  • I edit ABC-123, changing the field contactaddress

and so-on.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events