Hangfire.DynamicJobs icon indicating copy to clipboard operation
Hangfire.DynamicJobs copied to clipboard

Add DisplayName functionality

Open NiSHoW opened this issue 2 years ago • 3 comments

I am sending you this pull request as a POC to add the functionality already present in hangfire to modify the DisplayName of the job in the dashboard using the appropriate attribute.

In the commits I added the DisplayName property to the DynamicJob object so that it is serialized and deserialized. You will also find comments, on a possible alternative way (i.e. to resolve the display name at creation time)

Feel free to refuse the pull request and rewrite the code as you like, I thought it was more convenient to send you an example rather than a simple issue on the main hangfire repo.

NiSHoW avatar Jun 14 '23 10:06 NiSHoW

Hi @NiSHoW, sorry for the delay! A lot of things needed to be done concurrently. This is a great addition, but I see it's mixed with dynamic filter attribute discovery (unrelated to the display name). Can we solve them one by one?

odinserj avatar Jun 29 '23 03:06 odinserj

Hey, I’m not sure I understand what’s wrong with my code. Could you please explain it to me a bit more? I’d love to help you out and send you a clean pull request. I just wrote some rough code for now. By the way, what do you think about serializing the jobdisplayname attribute? Should we serialize it as it is or should we get the displayname first and save the string instead?

Oh, and I also deleted the code that adds the QueueAttribute attributes automatically.

NiSHoW avatar Jun 29 '23 09:06 NiSHoW

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Dec 05 '23 05:12 sonarqubecloud[bot]