We have an external application which adds entity properties to an user through a REST call. (not to confuse with the user properties that can be edited through the jira user interface)
is there a way to access these properties using a groovy script in behaviours and post functions through the object model? the examples I am finding all make use of the old user properties, but not the new entity properties or use a rest call like this:
def rest_call = "/usr/bin/curl -u user:pw http://yourserver.com/rest/api/2/user/properties/propertyname?user=someuuser"
def rest_call_response = rest_call.execute().text
I was able to make the REST call work in a post function, but not in a behaviour, therefore I am interested in an approach without a rest call.
-----------------------
the actual use case I would like to accomplish looks like this:
the jira username of the manager of a user is stored as an entity property "managerUsername" with the service desk customer user object.
when a service desk customer creates a new service request issue through the service desk interface a custom field "Approver" should be initialized with the user object of the manager. the user should still be able to change the user in the field.
---------------------
As a post function in the create transition it works, but that would mean the customer can't override the value to be set.