[JENKINS 57012] Need help to get current ItemGroup in configuration

82 views
Skip to first unread message

Mathieu Delrocq

unread,
May 24, 2019, 8:10:48 AM5/24/19
to Jenkins Developers
Hello,

I want to add the possibility to configure a folder scope credential on jira-plugin.
Actually we can configure a JiraSite on the global config and on a folder config.

I want to add the current ItemGroup in JiraSite class to know if it was created on a folder or on Global Config but I didn't find a way to do this.

Do you have any idea how to get the ItemGroup in DataBoundConstructor or if there is a way to get it and set it in a configuration class?

Thanks.

Mathieu

Jeff

unread,
May 24, 2019, 11:01:58 AM5/24/19
to jenkin...@googlegroups.com
Hi Mathieu

Are you looking from something like the Folder Properties Plugin? 

Best 
Jeff

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/06699172-88c0-48f5-9434-4aa91ba1db2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Markus Winter

unread,
May 24, 2019, 1:04:03 PM5/24/19
to jenkin...@googlegroups.com
Hi,

I think you will need to extend your JiraFolderProperty.
In the setSites methods you could call a method setOwner(folderprop.getOwner()) on JiraSite to inject the folder.

Regards
Markus

Mathieu Delrocq

unread,
Jun 5, 2019, 11:45:14 AM6/5/19
to Jenkins Developers
Hi,

Thank you for your answer. I tried your suggest but folderprop.getOwner() always return null...

Regards,

Mathieu


Le vendredi 24 mai 2019 19:04:03 UTC+2, Markus Winter a écrit :
Hi,

I think you will need to extend your JiraFolderProperty.
In the setSites methods you could call a method setOwner(folderprop.getOwner()) on JiraSite to inject the folder.

Regards
Markus

On 24.05.2019 11:42, Mathieu Delrocq wrote:
Hello,

I want to add the possibility to configure a folder scope credential on jira-plugin.
Actually we can configure a JiraSite on the global config and on a folder config.

I want to add the current ItemGroup in JiraSite class to know if it was created on a folder or on Global Config but I didn't find a way to do this.

Do you have any idea how to get the ItemGroup in DataBoundConstructor or if there is a way to get it and set it in a configuration class?

Thanks.

Mathieu
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkin...@googlegroups.com.

Mathieu Delrocq

unread,
Jun 5, 2019, 12:30:50 PM6/5/19
to Jenkins Developers
Hi Jeff,

It is not exactly like Folder Properties Plugin does. Actually you can set a list of JiraSite in a folder configuration and I would like to set the folder in JiraSite (as a property).
The goal is to know where the JiraSite was setted.

Regards,

Mathieu


Le vendredi 24 mai 2019 17:01:58 UTC+2, Jeff a écrit :
Hi Mathieu

Are you looking from something like the Folder Properties Plugin? 

Best 
Jeff

On Fri, May 24, 2019 at 5:10 AM Mathieu Delrocq <delrocq...@gmail.com> wrote:
Hello,

I want to add the possibility to configure a folder scope credential on jira-plugin.
Actually we can configure a JiraSite on the global config and on a folder config.

I want to add the current ItemGroup in JiraSite class to know if it was created on a folder or on Global Config but I didn't find a way to do this.

Do you have any idea how to get the ItemGroup in DataBoundConstructor or if there is a way to get it and set it in a configuration class?

Thanks.

Mathieu

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkin...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages