TriageBot :- nil value issues while refining the Milestone Class.
Issue
Hi there,
I am facing some issues while refining the Milestone Class
which is present in Gitlab::Triage::Resource::Milestone
. I am getting nil
for the value that I am calling. Please feel free to refer the images below for better understanding.
Description
- As you can see in the image above that I am not able to get value for the
due_date
directly inside the refined class, and am gettingnil
for that. However if I callresource['due_date']
, I am actually getting the value. - If I am using custom methods then I am fine accessing the value using
resource['due_date']
, but I am not able to use the methods provided in the documentation as each of them returns menil
, because it might be usingstart_date
/due_date
asnil
.. so the output. - Please let me know any fixes that can be made and also if I need to make any changes on my end to access the
start_date
anddue_date
directly instead of theresource['start_date']
/resource['due_date']
.
Proposed Solution
We had a look into the codebase and we found out that if there were some changes to the codebase that were made we would be getting the output as expected. Please feel free to look into the solution below.
- Line to fix is over here , and change it as below.
Please provide any feedback for this issue. Thank you.
Edited by Sachin796