Thank you so much Daniel Beck, that really worked for me!

On Monday, June 20, 2022 at 12:15:06 AM UTC-7 [email protected] wrote:

> The run is null, so there's nothing to get a sidepanel from.
>
> The RunAction2 special behavior isn't supported by 
> TransientActionFactory, so you need to add a constructor argument to end 
> up with a reference to the Run. Could be as designed based on the 
> RunAction2 Javadoc. The problem it solves is one that isn't trivial to do 
> otherwise (having a reference to the run after loading from disk), so I can 
> see why this might get ignored in the transient action factory case, 
> that's easy to solve.
>
> Here's a patch to make it work: 
> https://gist.github.com/daniel-beck/34b7a1425f85bfa499bd43823d17f030
>
> On Thu, Jun 16, 2022 at 8:48 PM Nozim Islamov <[email protected]> 
> wrote:
>
>> Actually, I am using RunAction2 interface, and I am using 
>> TransientActionFactory to show it for every Run, please refer to this git: 
>> https://github.com/M1ZoN/promoted/tree/SimpleBuildWrapper
>> ActionFactory: 
>> https://github.com/M1ZoN/promoted/blob/SimpleBuildWrapper/src/main/java/io/jenkins/plugins/sample/MyActionFactory.java
>> RunAction2: 
>> https://github.com/M1ZoN/promoted/blob/SimpleBuildWrapper/src/main/java/io/jenkins/plugins/sample/PromotedBuildAction.java
>> Jelly for Action: 
>> https://github.com/M1ZoN/promoted/blob/SimpleBuildWrapper/src/main/resources/io/jenkins/plugins/sample/PromotedBuildAction/index.jelly
>>
>> On Thursday, June 16, 2022 at 4:08:21 AM UTC-7 [email protected] wrote:
>>
>>> HI,
>>>
>>> If I understand your question correctly, you just need to return 
>>> non-null for getDisplayName and getIconFileName in your Action[1]
>>>
>>> /James
>>>
>>> [1] https://javadoc.jenkins.io//hudson/model/Action.html
>>>
>>> On Thursday, June 16, 2022 at 12:17:40 AM UTC+1 [email protected] 
>>> wrote:
>>>
>>>> Is there any way to include side-panel to actions that are created by 
>>>> TransientActionFactory?
>>>
>>> -- 
>> 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 [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/c4e9df21-9b96-4f3f-9acb-a11584cad93cn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-dev/c4e9df21-9b96-4f3f-9acb-a11584cad93cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>   
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/b35ea1db-315c-4730-a1aa-23e83d7baccfn%40googlegroups.com.

Reply via email to