Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple expiring system messages (#110, #112) #114

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Conversation

mawinter69
Copy link
Contributor

You can now define multiple system messages. Each message can have an expiration time. Messages can be dismissed on a per user basis.

fixes #112
fixes #110

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@mawinter69 mawinter69 requested a review from a team as a code owner June 2, 2024 21:39
You can now define multiple system messages. Each message can have an
expiration time. Messages can be dismissed on a per user basis.
@mawinter69 mawinter69 added the enhancement New feature or request label Jun 2, 2024
@mawinter69 mawinter69 merged commit c66905a into main Jun 3, 2024
18 checks passed
@jonesbusy
Copy link

Just updated the plugin, looks I cannot add anymore system message (via JCasC or UI)

jenkins        |        at java.base/java.lang.Thread.run(Unknown Source)
jenkins        | Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Set.removeIf(java.util.function.Predicate)" because the return value of "io.jenkins.plugins.customizable_header.UserHeader.getDismissedMessages()" is null
jenkins        |        at io.jenkins.plugins.customizable_header.CustomHeaderConfiguration.getSystemMessages(CustomHeaderConfiguration.java:143)
jenkins        |        at io.jenkins.plugins.customizable_header.headers.SystemMessageProvider.getSystemMessages(SystemMessageProvider.java:9)
jenkins        |        ... 154 more
jenkins        |  
jenkins        | [2024-06-03T13:34:06.103+0000] [WARNING] hudson.ExpressionFactory2$JexlExpression evaluate # Caught exception evaluating: instance[name] ?: attrs.default in /manage/appearance/. Reason: java.lang.reflect.InvocationTargetException 
jenkins        | java.lang.reflect.InvocationTargetException

@mawinter69
Copy link
Contributor Author

Just updated the plugin, looks I cannot add anymore system message (via JCasC or UI)

jenkins        |        at java.base/java.lang.Thread.run(Unknown Source)
jenkins        | Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Set.removeIf(java.util.function.Predicate)" because the return value of "io.jenkins.plugins.customizable_header.UserHeader.getDismissedMessages()" is null
jenkins        |        at io.jenkins.plugins.customizable_header.CustomHeaderConfiguration.getSystemMessages(CustomHeaderConfiguration.java:143)
jenkins        |        at io.jenkins.plugins.customizable_header.headers.SystemMessageProvider.getSystemMessages(SystemMessageProvider.java:9)
jenkins        |        ... 154 more
jenkins        |  
jenkins        | [2024-06-03T13:34:06.103+0000] [WARNING] hudson.ExpressionFactory2$JexlExpression evaluate # Caught exception evaluating: instance[name] ?: attrs.default in /manage/appearance/. Reason: java.lang.reflect.InvocationTargetException 
jenkins        | java.lang.reflect.InvocationTargetException

Thanks for reporting, hopefully fixed in version 113.v09524a_dfd80d

@mawinter69 mawinter69 deleted the expire-message branch October 27, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple system messages Expiring system message
2 participants