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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

83 views 0 5
Read article

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