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

Add an optional column with claim/unclaim/reclaim action to the test result page. #279

Merged

Conversation

ChristianMa97
Copy link
Contributor

Hey I´m Chris,
I was missing a claim option on the test result page and wanted to contribute it to the plugin.
Let me know if I should change something.

Changes:

Old Test Result page:
image

New Test Result page:
image

image

image

When the user is logged in, it shows the option to claim/reclaim and drop the claim in a new "Claim-Action" column on the Test Result page. When the user is not logged in, these options are not displayed.

Testing done

Tested the Plugin as anonymous and logged in user from an hpi:run instance.

Jira Issues:

https://issues.jenkins.io/browse/JENKINS-4169?jql=resolution%20is%20EMPTY%20and%20component%3D15531

Quick Claim Action could be added in the same column:
https://issues.jenkins.io/browse/JENKINS-69430?jql=resolution%20is%20EMPTY%20and%20component%3D15531

Submitter checklist

Preview Give feedback

commit 8a3362d
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Thu May 2 13:44:18 2024 +0200

    refactored and written comments

commit 6273475
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Thu May 2 11:51:02 2024 +0200

    Revert "added some documentation while reading through the code"

    This reverts commit 587162e.

commit 2e30aad
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Tue Apr 30 18:43:14 2024 +0200

    added <?jelly escape-by-default='true'?> to the jelly files

commit da01bd9
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Tue Apr 30 18:17:37 2024 +0200

    fixed typo

commit b13f599
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Tue Apr 30 18:17:12 2024 +0200

    put the getRelativeUrl only in ClaimTestAction

commit 4523a03
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Tue Apr 30 18:14:53 2024 +0200

    functioning Claim in TestOverview

commit 587162e
Author: Martin, Christian <ch.martin97@googlemail.com>
Date:   Mon Apr 29 12:15:32 2024 +0200

    added some documentation while reading through the code
@ChristianMa97 ChristianMa97 requested a review from a team as a code owner May 2, 2024 12:29
@Waschndolos
Copy link

+1 for this. This would certainly be helpful for Devs who want to fix a complete Test Class. Any comments from the Codeowners?

@Greybird
Copy link
Contributor

Hi, sorry for the delay, will try to take a look in the following days !

@Greybird
Copy link
Contributor

Greybird commented May 14, 2024

Hi,

I did a first run to get a first impression.
I found that when going to the page relative to a specific failed test result page, the table has no header, and that raising actions will fail
image

I did not debug further, will try to take a look in the next few days, but wanted to let you know if you would have a chance to check this before I do.

@ChristianMa97
Copy link
Contributor Author

Thank you for testing and the feedback, i'll look into it.

@ChristianMa97
Copy link
Contributor Author

Hi,

Sorry for the delay, i addressed the issues, could you have a look at it again?

@Greybird Greybird changed the title Added claim/unclaim/reclaim action to the test result page. Add an optional column with claim/unclaim/reclaim action to the test result page. May 26, 2024
@Greybird Greybird force-pushed the feature/claim-from-test-result-page branch from 45fcece to 8bc723a Compare May 26, 2024 23:03
@Greybird
Copy link
Contributor

Hi,

I just did a small round of changes. Can you please take a look and confirm everything is working as expected ?

</j:if>
<j:if test="${it.canReassign()}">
<j:if test="${linkWritten}"><st:nbsp/></j:if>
<a id="reassign" href="#" onClick="ShowPopup(this); return false;">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add an <br/> tag here for better formatting.
image
image

@ChristianMa97
Copy link
Contributor Author

It´s looking good and everything I tried is working.

I added the configuration to the readme, feel free to adjust it.

@Greybird Greybird merged commit 2c412fa into jenkinsci:master May 27, 2024
26 checks passed
@Greybird
Copy link
Contributor

Thanks let's merge this!

@ChristianMa97
Copy link
Contributor Author

My test-scope was to small when testing it. I found a bug when I tried it in production.
The functions to open and close the claimHoverPopup are always opening the popup of the first row.
I created a following PR to fix this #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants