Repository navigation
T&A 46734: Fix threshold level mapping on same platform - #12402
Open
lukas-heinrich wants to merge 2 commits into
Open
lukas-heinrich wants to merge 2 commits into
lukas-heinrich wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi everyone,
This PR addresses ticket 46734. The issue described in the ticket occurs specifically only when the test has been exported and then re-imported on the same platform.
Analysis
The cause lies in the method
\ilTestSkillLevelThresholdImporter::getLevelIdMapping. There, theimport_idcolumn of theskl_leveltable is searched for entries where the IDs from the source platform match the IDs of the target platform. By default, however, this column is empty. This means that no matches are found when the thresholds are re-imported onto the same platform. Consequently,$mappedLevelIdon line 158 isnull, and the method is completely terminated bycontinue(2).Solution
In this PR, I’m adding an additional check that runs if all previous conditions fail. Specifically, this new condition is executed only if the aforementioned attempt to map the import IDs fails. In this new condition, I check whether the LevelID and SkillID from the export match the records found in the
skl_leveltable. In my opinion, this is a clear indication that the skill level to be imported already exists on the target platform.I look forward to feedback on this proposal. As always, these changes were reviewed by @thojou during an internal review.
Best
@lukas-heinrich