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.
Where are you running this? And what is the rest of the script doing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, what does the rest of the postfunction do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it calls a REST Api and sending the data retrieved from the issue fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
That would be really helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
and so-on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.