TransientActionFactory question

55 views
Skip to first unread message

Nozim Islamov

unread,
Jun 15, 2022, 7:17:40 PM6/15/22
to Jenkins Developers
Is there any way to include side-panel to actions that are created by TransientActionFactory?

jn...@cloudbees.com

unread,
Jun 16, 2022, 7:08:21 AM6/16/22
to Jenkins Developers
HI,

If I understand your question correctly, you just need to return non-null for getDisplayName and getIconFileName in your Action[1]

/James

Nozim Islamov

unread,
Jun 16, 2022, 2:48:11 PM6/16/22
to Jenkins Developers

Daniel Beck

unread,
Jun 20, 2022, 3:15:06 AM6/20/22
to jenkin...@googlegroups.com
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.


--
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/c4e9df21-9b96-4f3f-9acb-a11584cad93cn%40googlegroups.com.
 


Nozim Islamov

unread,
Jun 20, 2022, 4:46:31 PM6/20/22
to Jenkins Developers
Thank you so much Daniel Beck, that really worked for me!
Reply all
Reply to author
Forward
0 new messages