JIRA Add User properties by scripting

Hi,

I'm trying to add a new property with a value through a wget script.

I'm trying to run this kind of URL with no success :

http://localhost:$$$$/secure/admin/user/EditUserProperties.jspa?key=<mypropertyname>&value=<myvalue>&name=<myuser>&+Add+=+Add+

I did the autication before that, my script is working except that.

Do you have an idea ?

Maybe you are using another way ?

Regards,

Sven.

2 answers

1 accepted

Greath Thanks Bob.

I found also another way by Jelly using core functionality.

Hey Sven, Can you share the another way of doing it ? pawansonu4@gmail.com

This is working well too :

&lt;JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:email="jelly:email" xmlns:log="jelly:log" xmlns:util="jelly:util" &gt;
&lt;log:warn&gt;  example log &lt;/log:warn&gt;

&lt;core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserManager" var="usermanager"/&gt;
&lt;core:invoke on="${usermanager}" method="getUser" var="user"&gt;
&lt;core:arg type="java.lang.String" value="myusername"/&gt;
&lt;/core:invoke&gt;

&lt;core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserPropertyManager" var="propertymanager"/&gt;
&lt;core:invoke on="${propertymanager}" method="getPropertySet" var="propertyset"&gt;&lt;core:arg type="com.atlassian.crowd.embedded.api.User" value="${user}"/&gt;
&lt;/core:invoke&gt;

&lt;core:invoke on="${propertyset}" method="setString"&gt;
&lt;core:arg type="java.lang.String" value="jira.meta.myproperty"/&gt;
&lt;core:arg type="java.lang.String" value="myvalueproperty"/&gt;
&lt;/core:invoke&gt;

&lt;/JiraJelly&gt;

No plugin needed

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Amir Kazemi
Posted 4 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

21 views 0 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you